Download data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicDecisionFormula.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.73 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicDecisionFormula.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicDecisionFormula.lean
-
curl -L -o AtomicDecisionFormula.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DegreeRigidity/Syntax/AtomicDecisionFormula.lean
5.73 kB
| import OAI.Computability.DegreeRigidity.Syntax.AtomicGraphCorrect | |
| import OAI.Computability.DegreeRigidity.Syntax.AtomicRequirements | |
| namespace OAI | |
| namespace TuringRigidity.AtomicForcing | |
| open Set RecursiveNames TransitiveNameModel BoundedSetTheory | |
| universe u | |
| def CodeWitness (d c k o f x y p : ZFSet.{u}) : Prop := | |
| β b β d, β t β c, ZFSet.pair b t β y β§ ZFSet.pair p t β o β§ Triple k f x b p | |
| def CodeNeg (d c k o f x y p : ZFSet.{u}) : Prop := | |
| β q β c, ZFSet.pair q p β o β Β¬ CodeWitness d c k o f x y q | |
| def CodeRefute (d c k o f x y p : ZFSet.{u}) : Prop := | |
| β a β d, β s β c, ZFSet.pair a s β x β§ ZFSet.pair p s β o β§ CodeNeg d c k o f a y p | |
| namespace AtomicFormula | |
| open Formula | |
| def witness (d c k o f x y p : β) : Formula := | |
| .existsMem d (.existsMem (c+1) | |
| (.conj (pairMem 1 0 (y+2)) (.conj (pairMem (p+2) 0 (o+2)) | |
| (triple (k+2) (f+2) (x+2) 1 (p+2))))) | |
| theorem eval_witness (d c k o f x y p : β) (e : β β ZFSet.{u}) : | |
| (witness d c k o f x y p).Eval e β | |
| CodeWitness (e d) (e c) (e k) (e o) (e f) (e x) (e y) (e p) := by | |
| simp only [witness,Formula.Eval,eval_pairMem,eval_triple,cons_zero,cons_succ,CodeWitness] | |
| def negMem (d c k o f x y p : β) : Formula := | |
| allMem c (imp (pairMem 0 (p+1) (o+1)) | |
| (.neg (witness (d+1) (c+1) (k+1) (o+1) (f+1) (x+1) (y+1) 0))) | |
| theorem eval_negMem (d c k o f x y p : β) (e : β β ZFSet.{u}) : | |
| (negMem d c k o f x y p).Eval e β | |
| CodeNeg (e d) (e c) (e k) (e o) (e f) (e x) (e y) (e p) := by | |
| simp only [negMem,eval_allMem,eval_imp,Formula.Eval,eval_pairMem,eval_witness, | |
| cons_zero,cons_succ,CodeNeg] | |
| def refute (d c k o f x y p : β) : Formula := | |
| .existsMem d (.existsMem (c+1) | |
| (.conj (pairMem 1 0 (x+2)) (.conj (pairMem (p+2) 0 (o+2)) | |
| (negMem (d+2) (c+2) (k+2) (o+2) (f+2) 1 (y+2) (p+2))))) | |
| theorem eval_refute (d c k o f x y p : β) (e : β β ZFSet.{u}) : | |
| (refute d c k o f x y p).Eval e β | |
| CodeRefute (e d) (e c) (e k) (e o) (e f) (e x) (e y) (e p) := by | |
| simp only [refute,Formula.Eval,eval_pairMem,eval_negMem,cons_zero,cons_succ,CodeRefute] | |
| def memTest (d c k o f x y p : β) : Formula := | |
| disj (witness d c k o f x y p) (negMem d c k o f x y p) | |
| def eqTest (d c k o f x y p : β) : Formula := | |
| disj (triple k f x y p) (disj (refute d c k o f x y p) (refute d c k o f y x p)) | |
| end AtomicFormula | |
| variable {c : ZFSet.{u}} [Preorder (Conditions c)] | |
| omit [Preorder (Conditions c)] in | |
| private theorem child_mem {d : ZFSet.{u}} (hd : Transitive d) | |
| (a : Name (Conditions c)) (ha : a.encode (label c) β d) (i : a.arity) : | |
| (a.child i).encode (label c) β d := by | |
| apply names_childClosed d c hd a ha | |
| cases a | |
| exact β¨i,rflβ© | |
| theorem codeWitness_iff {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) : | |
| CodeWitness d c (ZFSet.prod d d) o f (a.encode (label c)) (b.encode (label c)) (label c p) β | |
| Witness a b p := by | |
| have hrel (j) := (triple_pair ha (child_mem hd b hb j)).trans | |
| (hf.correct hd ho a (b.child j) ha (child_mem hd b hb j) p) | |
| cases b with | |
| | mk ΞΊ b t => | |
| constructor | |
| Β· rintro β¨x,hx,s,hs,hxs,hps,heβ© | |
| obtain β¨j,hj,hjsβ© := (pair_mem_encode _ _ _ _).mp hxs | |
| subst x | |
| subst s | |
| exact β¨j,(ho p (t j)).mp hps,(hrel j).mp heβ© | |
| Β· rintro β¨j,hj,heβ© | |
| exact β¨_,child_mem hd _ hb j,_,label_mem c (t j), | |
| (pair_mem_encode _ _ _ _).mpr β¨j,rfl,rflβ©,(ho p (t j)).mpr hj,(hrel j).mpr heβ© | |
| theorem negMem_iff_no_witness (a b : Name (Conditions c)) (p : Conditions c) : | |
| NegMem a b p β β q, q β€ p β Β¬ Witness a b q := by | |
| constructor | |
| Β· intro h q hq hw | |
| exact h q hq (witness_mem a b q hw) | |
| Β· intro h q hq hm | |
| cases b with | |
| | mk ΞΊ b t => | |
| obtain β¨r,hr,hwβ© := hm q le_rfl | |
| exact h r (hr.trans hq) hw | |
| theorem codeNeg_iff {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) : | |
| CodeNeg d c (ZFSet.prod d d) o f (a.encode (label c)) (b.encode (label c)) (label c p) β | |
| NegMem a b p := by | |
| rw [negMem_iff_no_witness] | |
| constructor | |
| Β· intro h q hq hw | |
| exact h _ (label_mem c q) ((ho q p).mpr hq) ((codeWitness_iff hd ho hf a b ha hb q).mpr hw) | |
| Β· intro h q hq hqp hw | |
| obtain β¨r,rflβ© := label_surjective c hq | |
| exact h r ((ho r p).mp hqp) ((codeWitness_iff hd ho hf a b ha hb r).mp hw) | |
| theorem codeRefute_iff {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) : | |
| CodeRefute d c (ZFSet.prod d d) o f (a.encode (label c)) (b.encode (label c)) (label c p) β | |
| β i, p β€ a.tag i β§ NegMem (a.child i) b p := by | |
| constructor | |
| Β· rintro β¨x,hx,s,hs,hxs,hps,hnβ© | |
| obtain β¨i,hi,hisβ© := (pair_mem_encode _ _ _ _).mp hxs | |
| subst x | |
| subst s | |
| exact β¨i,(ho p (a.tag i)).mp hps, | |
| (codeNeg_iff hd ho hf _ b (child_mem hd a ha i) hb p).mp hnβ© | |
| Β· rintro β¨i,hi,hnβ© | |
| exact β¨_,child_mem hd a ha i,_,label_mem c (a.tag i), | |
| (pair_mem_encode _ _ _ _).mpr β¨i,rfl,rflβ©,(ho p (a.tag i)).mpr hi, | |
| (codeNeg_iff hd ho hf _ b (child_mem hd a ha i) hb p).mpr hnβ© | |
| end TuringRigidity.AtomicForcing | |
| end OAI | |