Download data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicCertificate.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.49 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicCertificate.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicCertificate.lean
-
curl -L -o AtomicCertificate.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicCertificate.lean
4.49 kB
| import OAI.Computability.DegreeRigidity.SetModels.InternalAtomicTruth | |
| namespace OAI | |
| namespace TuringRigidity.AtomicForcing | |
| open Set RecursiveNames TransitiveNameModel BoundedSetTheory | |
| universe u | |
| namespace AtomicFormula | |
| open Formula | |
| def product (d k : β) : Formula := | |
| .conj (allMem k (.existsMem (d+1) (.existsMem (d+2) (orderedPair 2 1 0)))) | |
| (allMem d (allMem (d+1) (.existsMem (k+2) (orderedPair 0 2 1)))) | |
| theorem eval_product (d k : β) (e : β β ZFSet.{u}) : | |
| (product d k).Eval e β e k = ZFSet.prod (e d) (e d) := by | |
| simp only [product,Formula.Eval,eval_allMem,eval_orderedPair,cons_zero,cons_succ] | |
| constructor | |
| Β· rintro β¨hβ,hββ© | |
| apply ZFSet.ext | |
| intro z | |
| constructor | |
| Β· intro hz | |
| obtain β¨x,hx,y,hy,hzβ© := hβ z hz | |
| exact ZFSet.mem_prod.mpr β¨x,hx,y,hy,hzβ© | |
| Β· intro hz | |
| obtain β¨x,hx,y,hy,rflβ© := ZFSet.mem_prod.mp hz | |
| obtain β¨v,hv,rflβ© := hβ x hx y hy | |
| exact hv | |
| Β· intro hk | |
| constructor | |
| Β· intro z hz | |
| rw [hk] at hz | |
| exact ZFSet.mem_prod.mp hz | |
| Β· intro x hx y hy | |
| exact β¨_,hk βΈ ZFSet.mem_prod.mpr β¨x,hx,y,hy,rflβ©,rflβ© | |
| def graph (d c k o f : β) : Formula := | |
| .conj (allMem f (.existsMem (k+1) (.existsMem (c+2) (orderedPair 2 1 0)))) | |
| (allMem d (allMem (d+1) (allMem (c+2) | |
| (iff (triple (k+3) (f+3) 2 1 0) (step (d+3) (c+3) (k+3) (o+3) (f+3) 2 1 0))))) | |
| theorem eval_graph (d c k o f : β) (e : β β ZFSet.{u}) | |
| (hk : e k = ZFSet.prod (e d) (e d)) : | |
| (graph d c k o f).Eval e β Graph (e d) (e c) (e o) (e f) := by | |
| simp only [graph,Formula.Eval,eval_allMem,eval_orderedPair,eval_iff,eval_triple,eval_step, | |
| cons_zero,cons_succ,hk,Graph] | |
| constructor | |
| Β· rintro β¨hβ,hββ© | |
| refine β¨fun z hz => ZFSet.mem_prod.mpr (hβ z hz),?_β© | |
| intro x hx y hy q hq | |
| exact (triple_pair hx hy).symm.trans (hβ x hx y hy q hq) | |
| Β· rintro β¨hβ,hββ© | |
| refine β¨fun z hz => ZFSet.mem_prod.mp (hβ hz),?_β© | |
| intro x hx y hy q hq | |
| exact (triple_pair hx hy).trans (hβ x hx y hy q hq) | |
| def membership (d c k o f x y p : β) : Formula := | |
| allMem c (imp (pairMem 0 (p+1) (o+1)) | |
| (matchF false (d+1) (c+1) (k+1) (o+1) (f+1) (x+1) (y+1) 0)) | |
| def query (isMem : Bool) (d c k o f x y p : β) : Formula := | |
| if isMem then membership d c k o f x y p else triple k f x y p | |
| def matrix (isMem : Bool) : Formula := | |
| .conj (transitive 2) (.conj (.member 4 2) (.conj (.member 5 2) | |
| (.conj (product 2 1) (.conj (graph 2 6 1 7 0) (query isMem 2 6 1 7 0 4 5 3))))) | |
| def certificate (isMem : Bool) : SigmaFormula := | |
| .existsSet (.existsSet (.existsSet (.bounded (matrix isMem)))) | |
| end AtomicFormula | |
| variable {c : ZFSet.{u}} [Preorder (Conditions c)] | |
| theorem eval_membership {d o f : ZFSet.{u}} (hd : Transitive d) | |
| (ho : β r s : Conditions c, ZFSet.pair (label c r) (label c s) β o β r β€ s) | |
| (hf : Graph d c o f) (a b : Name (Conditions c)) | |
| (ha : a.encode (label c) β d) (hb : b.encode (label c) β d) (p : Conditions c) | |
| (e : β β ZFSet.{u}) (di ci ki oi fi xi yi pi : β) | |
| (he : e di = d β§ e ci = c β§ e ki = ZFSet.prod d d β§ e oi = o β§ e fi = f β§ | |
| e xi = a.encode (label c) β§ e yi = b.encode (label c) β§ e pi = label c p) : | |
| (AtomicFormula.membership di ci ki oi fi xi yi pi).Eval e β MemForces a b p := by | |
| rcases he with β¨hd',hc',hk',ho',hf',hx',hy',hp'β© | |
| simp only [AtomicFormula.membership,Formula.eval_allMem,Formula.eval_imp, | |
| Formula.eval_pairMem,AtomicFormula.eval_matchF,cons_zero,cons_succ, | |
| hd',hc',hk',ho',hf',hx',hy',hp'] | |
| have step (q : Conditions c) : | |
| Match false d c (ZFSet.prod d d) o f (a.encode (label c)) (b.encode (label c)) (label c q) β | |
| β r, r β€ q β§ Witness a b r := by | |
| rw [match_encode false hd ho b hb q] | |
| simp only [Bool.false_eq_true,ite_false] | |
| cases b with | |
| | mk ΞΊ b t => | |
| have hchild (j) : (b j).encode (label c) β d := names_childClosed d c hd (.mk ΞΊ b t) hb (b j) β¨j,rflβ© | |
| have hrel (j) (r : Conditions c) := (triple_pair ha (hchild j)).trans | |
| (hf.correct hd ho a (b j) ha (hchild j) r) | |
| simp only [Name.arity,Name.child,Name.tag,hrel,Witness] | |
| cases b with | |
| | mk ΞΊ b t => | |
| constructor | |
| Β· intro h q hq | |
| exact (step q).mp (h _ (label_mem c q) ((ho q p).mpr hq)) | |
| Β· intro h q hq hqp | |
| obtain β¨r,rflβ© := label_surjective c hq | |
| exact (step r).mpr (h r ((ho r p).mp hqp)) | |
| end TuringRigidity.AtomicForcing | |
| end OAI | |