Download data/lean/OAI/Computability/DegreeRigidity/Constructibility/ConstructionInputData.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DegreeRigidity/Constructibility/ConstructionInputData.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/DegreeRigidity/Constructibility/ConstructionInputData.lean
-
curl -L -o ConstructionInputData.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DegreeRigidity/Constructibility/ConstructionInputData.lean
5.24 kB
| import OAI.Computability.DegreeRigidity.Constructibility.ConstructionInlining | |
| namespace OAI | |
| namespace TuringRigidity.RelativeConstructible | |
| open ElementaryModel BoundedSetTheory TransitiveNameModel | |
| universe u | |
| inductive ConstructionInput : Type (u+1) | |
| | reals | |
| | stage (o : Ordinal.{u}) | |
| | realPath (path : List β) | |
| def pathReal (P : Oracle) : List β β Oracle | |
| | [] => P | |
| | i::is => pathReal (realPart P i) is | |
| noncomputable def ConstructionInput.value (R : ZFSet.{u}) (P : Oracle) : | |
| ConstructionInput.{u} β ZFSet.{u} | |
| | .reals => R | |
| | .stage o => level R o | |
| | .realPath path => realCode (pathReal P path) | |
| def ConstructionInput.prefix (i : β) : ConstructionInput.{u} β ConstructionInput.{u} | |
| | .reals => .reals | |
| | .stage o => .stage o | |
| | .realPath path => .realPath (i::path) | |
| theorem ConstructionInput.prefix_value (d : ConstructionInput.{u}) | |
| (R : ZFSet.{u}) (P : Oracle) (i : β) : | |
| (d.prefix i).value R P = d.value R (realPart P i) := by | |
| cases d <;> rfl | |
| def ConstructionInput.Indexed (M : ZFSet.{u}) : ConstructionInput.{u} β Prop | |
| | .reals => True | |
| | .stage o => o.toZFSet β M | |
| | .realPath _ => True | |
| theorem ConstructionInput.prefix_indexed (d : ConstructionInput.{u}) | |
| (M : ZFSet.{u}) (i : β) : (d.prefix i).Indexed M β d.Indexed M := by | |
| cases d <;> rfl | |
| noncomputable def Construction.inputData : Construction.{u} β β β ConstructionInput.{u} | |
| | .reals, _ => .reals | |
| | .parameter, _ => .realPath [] | |
| | .define o _ _ _, 0 => .stage o | |
| | .define _ n _ c, k+1 => | |
| if h : (Nat.unpair k).1 < n then | |
| ((c β¨(Nat.unpair k).1,hβ©).inputData (Nat.unpair k).2).prefix (Nat.unpair k).1 | |
| else .reals | |
| theorem Construction.inputs_eq_data (t : Construction.{u}) (R : ZFSet.{u}) | |
| (P : Oracle) (k : β) : t.inputs R P k = (t.inputData k).value R P := by | |
| induction t generalizing P k with | |
| | reals => rfl | |
| | parameter => rfl | |
| | define o n p c ih => | |
| cases k with | |
| | zero => rfl | |
| | succ k => | |
| simp only [Construction.inputs,Construction.inputData] | |
| split | |
| next h => rw [ConstructionInput.prefix_value]; exact ih _ _ _ | |
| next => rfl | |
| theorem Construction.inputData_indexed (t : Construction.{u}) (M : ZFSet.{u}) | |
| (hi : t.Indexed M) : β k, (t.inputData k).Indexed M := by | |
| induction t with | |
| | reals => exact fun _ => trivial | |
| | parameter => exact fun _ => trivial | |
| | define o n p c ih => | |
| intro k | |
| cases k with | |
| | zero => exact hi.1 | |
| | succ k => | |
| simp only [Construction.inputData] | |
| split | |
| next h => | |
| rw [ConstructionInput.prefix_indexed] | |
| exact ih _ (hi.2 _) _ | |
| next => trivial | |
| noncomputable def Construction.membershipFormula (t : Construction.{u}) : SentenceForm := | |
| .ex (.conj (t.formula 0 (fun k => k+2)) (.member 1 0)) | |
| theorem Construction.membershipFormula_spec (t : Construction.{u}) (M R : ZFSet.{u}) | |
| (hM : Transitive M) (hT : SourceT M) (hR : R β M) (P : Oracle) | |
| (ht : t.Certified R P) (hi : t.Indexed M) (z : ZFSet.{u}) (hz : z β M) : | |
| t.membershipFormula.Sat (M : Set ZFSet) (cons z (t.inputs R P)) β | |
| z β t.value R P := by | |
| have hspec (x : ZFSet.{u}) (hx : x β M) : | |
| (t.formula 0 (fun k => k+2)).Sat (M : Set ZFSet) | |
| (cons x (cons z (t.inputs R P))) β x = t.value R P := by | |
| apply t.formula_spec M R hM hT hR P ht hi | |
| Β· intro i | |
| rcases i with _|_|i | |
| Β· exact hx | |
| Β· exact hz | |
| Β· exact t.inputs_mem M R hM hT hR P ht hi i | |
| Β· exact fun _ => rfl | |
| change (β x β M, (t.formula 0 (fun k => k+2)).Sat (M : Set ZFSet) | |
| (cons x (cons z (t.inputs R P))) β§ z β x) β _ | |
| constructor | |
| Β· rintro β¨x,hx,hf,hzxβ© | |
| exact (hspec x hx).mp hf βΈ hzx | |
| Β· intro hzt | |
| have hv := t.value_mem M R hM hT hR P ht hi | |
| exact β¨_,hv,(hspec _ hv).mpr rfl,hztβ© | |
| theorem Construction.finite_membership_definition (t : Construction.{u}) : | |
| β (n : β) (p : SentenceForm) (d : Fin n β ConstructionInput.{u}), | |
| p.bound β€ n+1 β§ | |
| β (M R : ZFSet.{u}) (_hM : Transitive M) (_hT : SourceT M) (_hR : R β M) | |
| (P : Oracle) (_ht : t.Certified R P) (_hi : t.Indexed M), | |
| (β i, (d i).Indexed M β§ (d i).value R P β M) β§ | |
| β z β M, p.Sat (M : Set ZFSet) | |
| (cons z (tupleEnv (fun i => (d i).value R P))) β z β t.value R P := by | |
| let p := t.membershipFormula | |
| refine β¨p.bound,p,fun i => t.inputData i,by omega,?_β© | |
| intro M R hM hT hR P ht hi | |
| refine β¨fun i => β¨t.inputData_indexed M hi i,?_β©,?_β© | |
| Β· rw [β t.inputs_eq_data] | |
| exact t.inputs_mem M R hM hT hR P ht hi i | |
| Β· intro z hz | |
| have hf : p.Sat (M : Set ZFSet) | |
| (cons z (tupleEnv (fun i : Fin p.bound => (t.inputData i).value R P))) β | |
| p.Sat (M : Set ZFSet) (cons z (t.inputs R P)) := by | |
| apply p.finite_support | |
| intro i hin | |
| cases i with | |
| | zero => rfl | |
| | succ i => | |
| simp only [cons_succ] | |
| change tupleEnv (fun j : Fin p.bound => (t.inputData j).value R P) i = t.inputs R P i | |
| rw [tupleEnv, dite_eq_left (show i < p.bound by omega)] | |
| exact (t.inputs_eq_data R P i).symm | |
| exact hf.trans (t.membershipFormula_spec M R hM hT hR P ht hi z hz) | |
| end TuringRigidity.RelativeConstructible | |
| end OAI | |