Download data/lean/OAI/SetTheory/PartitionPrinciple/Definability/AssignmentQueryFormulas.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.32 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/SetTheory/PartitionPrinciple/Definability/AssignmentQueryFormulas.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/SetTheory/PartitionPrinciple/Definability/AssignmentQueryFormulas.lean
-
curl -L -o AssignmentQueryFormulas.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/SetTheory/PartitionPrinciple/Definability/AssignmentQueryFormulas.lean
6.32 kB
| import OAI.SetTheory.PartitionPrinciple.Geometry.RepresentativeIndexSteps | |
| namespace OAI | |
| namespace PartitionPilot.Forcing | |
| universe u | |
| noncomputable def assignmentQueryRelation (I T C D : ZFSet.{u}) : ZFSet.{u} := | |
| ZFSet.sep (fun z => β row L A, | |
| z = ZFSet.pair (ZFSet.pair row L) (ZFSet.pair row A) β§ | |
| assignmentOnIndices (assignmentIndices I T L) T A = L) (ZFSet.prod C D) | |
| theorem assignmentQueryRelation_entry (I T C D row L other A : ZFSet.{u}) : | |
| ZFSet.pair (ZFSet.pair row L) (ZFSet.pair other A) β assignmentQueryRelation I T C D β | |
| ZFSet.pair row L β C β§ ZFSet.pair other A β D β§ row = other β§ | |
| assignmentOnIndices (assignmentIndices I T L) T A = L := by | |
| rw [assignmentQueryRelation, ZFSet.mem_sep, ZFSet.pair_mem_prod] | |
| constructor | |
| Β· rintro β¨β¨hq, hpβ©, r, L', A', eq, matchListβ© | |
| obtain β¨first, secondβ© := ZFSet.pair_inj.1 eq | |
| obtain β¨rfl, rflβ© := ZFSet.pair_inj.1 first | |
| obtain β¨rfl, rflβ© := ZFSet.pair_inj.1 second | |
| exact β¨hq, hp, rfl, matchListβ© | |
| Β· rintro β¨hq, hp, rfl, matchListβ© | |
| exact β¨β¨hq, hpβ©, row, L, A, rfl, matchListβ© | |
| noncomputable def realizedAssignmentQueries (I T C D : ZFSet.{u}) : ZFSet.{u} := | |
| relationImage D C (relationConverse C D (assignmentQueryRelation I T C D)) | |
| theorem mem_realizedAssignmentQueries (I T C D q : ZFSet.{u}) : | |
| q β realizedAssignmentQueries I T C D β | |
| q β C β§ β p β D, ZFSet.pair q p β assignmentQueryRelation I T C D := by | |
| rw [realizedAssignmentQueries, mem_relationImage] | |
| constructor | |
| Β· rintro β¨hq, p, hp, entryβ© | |
| exact β¨hq, p, hp, ((pair_mem_relationConverse C D _ q p).1 entry).2.2β© | |
| Β· rintro β¨hq, p, hp, entryβ© | |
| exact β¨hq, p, hp, (pair_mem_relationConverse C D _ q p).2 β¨hq, hp, entryβ©β© | |
| theorem assignmentIndexOverlap_iff (I T L z : ZFSet.{u}) : | |
| (β i β I, β w β L, | |
| ZFSet.pair z i β productFirst I (ZFSet.prod T T) β§ | |
| ZFSet.pair w i β productFirst I (ZFSet.prod T T)) β | |
| z β stageOneAssignments (assignmentIndices I T L) T := by | |
| constructor | |
| Β· rintro β¨i, hi, w, hw, first, secondβ© | |
| obtain β¨j, _, rest, hr, equalβ© := (mem_productFirst I (ZFSet.prod T T) _).1 first | |
| obtain β¨rfl, rflβ© := ZFSet.pair_inj.1 equal | |
| exact ZFSet.pair_mem_prod.2 | |
| β¨(mem_relationImage L I _ _).2 β¨hi, w, hw, secondβ©, hrβ© | |
| Β· intro member | |
| obtain β¨i, hi, rest, hr, rflβ© := ZFSet.mem_prod.1 member | |
| obtain β¨hi, w, hw, secondβ© := (mem_relationImage L I _ i).1 hi | |
| exact β¨i, hi, w, hw, (mem_productFirst I (ZFSet.prod T T) _).2 | |
| β¨i, hi, rest, hr, rflβ©, secondβ© | |
| namespace BoundedFormula | |
| open SetFormula | |
| def assignmentQueryOverlapFormula {n} (z I L f : Fin n) : BoundedFormula n := | |
| exMem I (exMem L.succ (.conj (pairMembershipFormula z.succ.succ 1 f.succ.succ) | |
| (pairMembershipFormula 0 1 f.succ.succ))) | |
| theorem truth_assignmentQueryOverlapFormula {n} (z I L f : Fin n) | |
| (env : Fin n β ZFSet.{u}) : | |
| Truth (assignmentQueryOverlapFormula z I L f) env β | |
| β i β env I, β w β env L, | |
| ZFSet.pair (env z) i β env f β§ ZFSet.pair w i β env f := by | |
| simp only [assignmentQueryOverlapFormula, truth_exMem, Truth, truth_pairMembershipFormula] | |
| rfl | |
| def assignmentQueryMatchFormula {n} (I L A f : Fin n) : BoundedFormula n := | |
| .conj (.allMem L (.conj (.mem 0 A.succ) | |
| (assignmentQueryOverlapFormula 0 I.succ L.succ f.succ))) | |
| (.allMem A (.imp (assignmentQueryOverlapFormula 0 I.succ L.succ f.succ) (.mem 0 L.succ))) | |
| theorem truth_assignmentQueryMatchFormula {n} (I L A f : Fin n) | |
| (env : Fin n β ZFSet.{u}) (T : ZFSet.{u}) | |
| (projection : env f = productFirst (env I) (ZFSet.prod T T)) : | |
| Truth (assignmentQueryMatchFormula I L A f) env β | |
| assignmentOnIndices (assignmentIndices (env I) T (env L)) T (env A) = env L := by | |
| simp only [assignmentQueryMatchFormula, Truth, truth_imp, truth_assignmentQueryOverlapFormula] | |
| change ((β z β env L, z β env A β§ β i β env I, β w β env L, | |
| ZFSet.pair z i β env f β§ ZFSet.pair w i β env f) β§ | |
| (β z β env A, (β i β env I, β w β env L, | |
| ZFSet.pair z i β env f β§ ZFSet.pair w i β env f) β z β env L)) β _ | |
| simp only [projection, assignmentIndexOverlap_iff] | |
| constructor | |
| Β· intro h | |
| apply ZFSet.ext | |
| intro z | |
| rw [mem_assignmentOnIndices] | |
| exact β¨fun hz => h.2 z hz.1 hz.2, fun hz => h.1 z hzβ© | |
| Β· intro equal | |
| constructor | |
| Β· intro z hz | |
| exact (mem_assignmentOnIndices _ _ _ z).1 (equal.symm βΈ hz) | |
| Β· intro z hz hi | |
| exact equal βΈ (mem_assignmentOnIndices _ _ _ z).2 β¨hz, hiβ© | |
| def assignmentQueryRelationFormula {n} (z I f : Fin n) : BoundedFormula n := | |
| exPairFields z (exPairFields 1 (exPairFields 2 | |
| (.conj (.equal 3 1) (assignmentQueryMatchFormula I.succ.succ.succ.succ.succ.succ | |
| 2 0 f.succ.succ.succ.succ.succ.succ)))) | |
| theorem truth_assignmentQueryRelationFormula {n} (z I f : Fin n) | |
| (env : Fin n β ZFSet.{u}) (T : ZFSet.{u}) | |
| (projection : env f = productFirst (env I) (ZFSet.prod T T)) : | |
| Truth (assignmentQueryRelationFormula z I f) env β | |
| β row L A, env z = ZFSet.pair (ZFSet.pair row L) (ZFSet.pair row A) β§ | |
| assignmentOnIndices (assignmentIndices (env I) T L) T A = L := by | |
| simp only [assignmentQueryRelationFormula, truth_exPairFields] | |
| constructor | |
| Β· rintro β¨q, p, hz, row, L, hq, other, A, hp, same, matchListβ© | |
| change q = ZFSet.pair row L at hq | |
| change p = ZFSet.pair other A at hp | |
| change row = other at same | |
| have eq := (truth_assignmentQueryMatchFormula I.succ.succ.succ.succ.succ.succ 2 0 | |
| f.succ.succ.succ.succ.succ.succ | |
| (extend A (extend other (extend L (extend row (extend p (extend q env)))))) T projection).1 matchList | |
| exact β¨row, L, A, by rw [hz, hq, hp, β same], eqβ© | |
| Β· rintro β¨row, L, A, hz, matchListβ© | |
| exact β¨ZFSet.pair row L, ZFSet.pair row A, hz, row, L, rfl, row, A, rfl, | |
| rfl, (truth_assignmentQueryMatchFormula I.succ.succ.succ.succ.succ.succ 2 0 | |
| f.succ.succ.succ.succ.succ.succ | |
| (extend A (extend row (extend L (extend row | |
| (extend (ZFSet.pair row A) (extend (ZFSet.pair row L) env)))))) T projection).2 matchListβ© | |
| end BoundedFormula | |
| end PartitionPilot.Forcing | |
| end OAI | |