File size: 4,218 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | import OAI.Computability.DegreeRigidity.Effective.CodingOnePoint
namespace OAI
namespace TuringRigidity.CodingSplitting
open CodingForcing
def OnePoint (base : List Bool) (f : List Bool β Part β) : Prop :=
β s m b v w, base <+: s β§ base.length β€ m β§ m < s.length β§ v β w β§
v β f s β§ w β f (s.set m b)
private theorem interpolate (base : List Bool) (f : List Bool β Part β)
(hmono : β {s t}, s <+: t β β v, v β f s β v β f t)
(hdense : β s, base <+: s β β u v, v β f (s ++ u))
(u : List Bool) : β v : List Bool, u.length = v.length β
β pre tail, base <+: pre β β a b,
a β f (pre ++ u ++ tail) β b β f (pre ++ v ++ tail) β a β b β OnePoint base f := by
induction u with
| nil =>
intro v hlen pre tail hpre a b ha hb hab
have hv : v = [] := List.length_eq_zero_iff.mp hlen.symm
subst v
exact False.elim (hab (Part.mem_unique ha hb))
| cons x u ih =>
intro v hlen pre tail hpre a b ha hb hab
cases v with
| nil => simp at hlen
| cons y v =>
have hlen' : u.length = v.length := Nat.succ.inj hlen
let mid := pre ++ (x :: v) ++ tail
have hmid : base <+: mid := by
simpa only [mid, List.append_assoc] using hpre.trans (List.prefix_append pre ((x :: v) ++ tail))
obtain β¨extra, c, hcβ© := hdense mid hmid
have ha' : a β f ((pre ++ (x :: u) ++ tail) ++ extra) :=
hmono (List.prefix_append _ _) a ha
have hb' : b β f ((pre ++ (y :: v) ++ tail) ++ extra) :=
hmono (List.prefix_append _ _) b hb
by_cases hcb : c = b
Β· apply ih v hlen' (pre ++ [x]) (tail ++ extra)
(hpre.trans (List.prefix_append _ _)) a c
Β· simpa only [List.append_assoc, List.cons_append, List.nil_append] using ha'
Β· simpa only [mid, List.append_assoc, List.cons_append, List.nil_append] using hc
Β· simpa only [hcb] using hab
Β· refine β¨mid ++ extra, pre.length, y, c, b,
hmid.trans (List.prefix_append _ _), hpre.length_le, ?_, hcb, hc, ?_β©
Β· simp [mid]
Β· have heq : (mid ++ extra).set pre.length y =
(pre ++ (y :: v) ++ tail) ++ extra := by
simp [mid, List.append_assoc, List.set_append_right]
rw [heq]
exact hb'
theorem onePoint_of_dense {base s t : List Bool} {f : List Bool β Part β}
(hmono : β {s t}, s <+: t β β v, v β f s β v β f t)
(hdense : β s, base <+: s β β u v, v β f (s ++ u))
(hs : base <+: s) (ht : base <+: t) (a b : β)
(ha : a β f s) (hb : b β f t) (hab : a β b) : OnePoint base f := by
obtain β¨u, rflβ© := hs
obtain β¨v, rflβ© := ht
let L := max u.length v.length
let u' := u ++ List.replicate (L - u.length) false
let v' := v ++ List.replicate (L - v.length) false
have hlu : u'.length = L := by simp only [u', List.length_append, List.length_replicate]; omega
have hlv : v'.length = L := by simp only [v', List.length_append, List.length_replicate]; omega
have ha' : a β f (base ++ u') := by
apply hmono (show base ++ u <+: base ++ u' from ?_) a ha
exact β¨List.replicate (L-u.length) false, by simp [u', List.append_assoc]β©
have hb' : b β f (base ++ v') := by
apply hmono (show base ++ v <+: base ++ v' from ?_) b hb
exact β¨List.replicate (L-v.length) false, by simp [v', List.append_assoc]β©
exact interpolate base f hmono hdense u' v' (hlu.trans hlv.symm)
base [] List.prefix_rfl a b (by simpa using ha') (by simpa using hb') hab
theorem split_or_divergent_word {Y : Oracle} {e : OracleCode} {base s t : List Bool}
(hs : base <+: s) (ht : base <+: t) (n a b : β)
(ha : a β CommonIdeal.run Y e s n) (hb : b β CommonIdeal.run Y e t n) (hab : a β b) :
OnePoint base (fun w => CommonIdeal.run Y e w n) β¨
β w, base <+: w β§ β u v, v β CommonIdeal.run Y e (w ++ u) n := by
by_cases hd : β w, base <+: w β β u v, v β CommonIdeal.run Y e (w ++ u) n
Β· exact Or.inl (onePoint_of_dense (fun h v hv => CommonIdeal.run_mono h n v hv)
hd hs ht a b ha hb hab)
Β· right
push Not at hd
exact hd
end TuringRigidity.CodingSplitting
end OAI
|