Download data/lean/OAI/RingTheory/DirectFiniteness/CandidateRelations.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.99 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RingTheory/DirectFiniteness/CandidateRelations.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RingTheory/DirectFiniteness/CandidateRelations.lean
-
curl -L -o CandidateRelations.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RingTheory/DirectFiniteness/CandidateRelations.lean
5.99 kB
| import OAI.RingTheory.DirectFiniteness.CyclicLabels | |
| namespace OAI | |
| universe u_1 u_2 u_3 u_4 u_5 u_6 u_7 u_8 u_9 u_10 u_11 u_12 | |
| noncomputable section | |
| open scoped Classical BigOperators | |
| namespace KaplanskyCounterexample.FiniteGeometry | |
| variable {Q : Type u_1} {A : Type u_2} {R : Type u_3} {E : Type u_4} [Field Q] [AddCommGroup A] [Module Q A] | |
| [AddCommGroup E] [Module Q E] | |
| structure GenericStep (Q : Type u_5) (R : Type u_6) (E : Type u_7) [Zero E] where | |
| label : R Γ Q | |
| scalar : Q | |
| component : E | |
| nonzero : component β 0 | |
| structure ExceptionalStep (Q : Type u_8) (R : Type u_9) [Zero Q] where | |
| label : R | |
| scalar : Q | |
| nonzero : scalar β 0 | |
| abbrev PolygonStep (Q : Type u_10) (R : Type u_11) (E : Type u_12) [Zero Q] [Zero E] := GenericStep Q R E β ExceptionalStep Q R | |
| namespace PolygonStep | |
| def label : PolygonStep Q R E β (R Γ Q) β R | |
| | .inl g => .inl g.label | |
| | .inr e => .inr e.label | |
| def bundle : PolygonStep Q R E β R | |
| | .inl g => g.label.1 | |
| | .inr e => e.label | |
| def wcoord : PolygonStep Q R E β Q Γ Q | |
| | .inl g => (g.scalar,g.scalar*g.label.2) | |
| | .inr e => (0,e.scalar) | |
| def ecoord : PolygonStep Q R E β E | |
| | .inl g => g.component | |
| | .inr _ => 0 | |
| def vector (F : DirectionFrame Q A R E) : PolygonStep Q R E β A | |
| | .inl g => F.u g.label (g.scalar,g.component) | |
| | .inr e => F.exc e.label e.scalar | |
| omit [Module Q E] in | |
| lemma ecoord_nonzero {s : PolygonStep Q R E} {j : R Γ Q} (hs : s.label = .inl j) : | |
| s.ecoord β 0 := by | |
| cases s with | |
| | inl g => exact g.nonzero | |
| | inr e => cases hs | |
| lemma vector_ne_zero (F : DirectionFrame Q A R E) (s : PolygonStep Q R E) : | |
| s.vector F β 0 := by | |
| cases s with | |
| | inl g => | |
| intro h | |
| have hz : (g.scalar,g.component) = 0 := F.u_injective g.label (h.trans (F.u _).map_zero.symm) | |
| exact g.nonzero (congrArg Prod.snd hz) | |
| | inr e => | |
| intro h | |
| exact e.nonzero (F.exc_injective e.label (h.trans (F.exc _).map_zero.symm)) | |
| def blockLabel (s : PolygonStep Q R E) (b : Fin 2) : R β (R Γ Q) := | |
| if b = 0 then .inl s.bundle else | |
| match s with | |
| | .inl g => .inr g.label | |
| | .inr e => .inl e.label | |
| def blockVector (F : DirectionFrame Q A R E) (s : PolygonStep Q R E) (b : Fin 2) : A := | |
| if b = 0 then F.w s.bundle s.wcoord else | |
| match s with | |
| | .inl g => F.e g.label g.component | |
| | .inr _ => 0 | |
| lemma blockVector_mem (F : DirectionFrame Q A R E) (s : PolygonStep Q R E) (b : Fin 2) : | |
| s.blockVector F b β Sum.elim (fun r => (F.w r).range) (fun j => (F.e j).range) | |
| (s.blockLabel b) := by | |
| fin_cases b | |
| Β· cases s with | |
| | inl g => exact β¨(g.scalar,g.scalar*g.label.2),rflβ© | |
| | inr e => exact β¨(0,e.scalar),rflβ© | |
| Β· cases s with | |
| | inl g => exact β¨g.component,rflβ© | |
| | inr e => exact β¨0,(F.w e.label).map_zeroβ© | |
| lemma sum_blocks (F : DirectionFrame Q A R E) (s : PolygonStep Q R E) : | |
| β b : Fin 2, s.blockVector F b = s.vector F := by | |
| cases s <;> simp [blockVector,vector,bundle,wcoord,DirectionFrame.u_apply, | |
| Fin.sum_univ_succ] | |
| lemma filter_blocks_E (F : DirectionFrame Q A R E) (s : PolygonStep Q R E) (j : R Γ Q) : | |
| β b : Fin 2, (if s.blockLabel b = .inr j then s.blockVector F b else 0) = | |
| if s.label = .inl j then F.e j s.ecoord else 0 := by | |
| rw [Fin.sum_univ_two] | |
| cases s with | |
| | inl g => | |
| dsimp [blockLabel,blockVector,label,bundle,wcoord,ecoord] | |
| by_cases h : g.label = j <;> simp_all | |
| | inr e => simp [blockLabel,label,bundle] | |
| lemma filter_blocks_W (F : DirectionFrame Q A R E) (s : PolygonStep Q R E) (r : R) : | |
| β b : Fin 2, (if s.blockLabel b = .inl r then s.blockVector F b else 0) = | |
| if s.bundle = r then F.w r s.wcoord else 0 := by | |
| rw [Fin.sum_univ_two] | |
| cases s with | |
| | inl g => | |
| dsimp [blockLabel,blockVector,bundle,wcoord] | |
| by_cases h : g.label.1 = r <;> simp_all | |
| | inr e => | |
| dsimp [blockLabel,blockVector,bundle,wcoord] | |
| by_cases h : e.label = r <;> simp_all | |
| end PolygonStep | |
| namespace DirectionFrame | |
| variable (F : DirectionFrame Q A R E) | |
| lemma polygon_component_sums {k : β} (s : Fin k β PolygonStep Q R E) (hk : k β€ 5) | |
| (hz : β i, (s i).vector F = 0) : | |
| (β j : R Γ Q, β i β Finset.univ.filter (fun i => (s i).label = .inl j), (s i).ecoord = 0) β§ | |
| (β r : R, β i β Finset.univ.filter (fun i => (s i).bundle = r), (s i).wcoord = 0) := by | |
| let lab (p : Fin k Γ Fin 2) := (s p.1).blockLabel p.2 | |
| let v (p : Fin k Γ Fin 2) := (s p.1).blockVector F p.2 | |
| have hcard : (Finset.univ : Finset (Fin k Γ Fin 2)).card β€ 10 := by simp; omega | |
| have hvz : β p : Fin k Γ Fin 2, v p = 0 := by | |
| rw [Fintype.sum_prod_type] | |
| simp_rw [v,PolygonStep.sum_blocks] | |
| exact hz | |
| have hsep := F.direct.grouped_sum Finset.univ hcard lab v | |
| (fun p _ => PolygonStep.blockVector_mem F _ _) hvz | |
| constructor | |
| Β· intro j | |
| have hh := hsep (.inr j) | |
| rw [Finset.sum_filter,Fintype.sum_prod_type] at hh | |
| simp_rw [lab,v,PolygonStep.filter_blocks_E] at hh | |
| apply F.einj j | |
| rw [map_zero,map_sum] | |
| simpa only [Finset.sum_filter] using hh | |
| Β· intro r | |
| have hh := hsep (.inl r) | |
| rw [Finset.sum_filter,Fintype.sum_prod_type] at hh | |
| simp_rw [lab,v,PolygonStep.filter_blocks_W] at hh | |
| apply F.winj r | |
| rw [map_zero,map_sum] | |
| simpa only [Finset.sum_filter] using hh | |
| /-- Every occurring generic label occurs precisely twice in a candidate with | |
| at most five steps. No exceptional-vector cancellation has been assumed. -/ | |
| lemma generic_occurs_twice {k : β} (s : Fin k β PolygonStep Q R E) (hk : k β€ 5) | |
| (hz : β i, (s i).vector F = 0) | |
| (hadj : β i, (s i).label β (s (finRotate k i)).label) | |
| (j : R Γ Q) (hj : β i, (s i).label = .inl j) : | |
| (Finset.univ.filter (fun i => (s i).label = .inl j)).card = 2 := by | |
| exact cyclic_label_count_eq_two (fun i => (s i).label) (fun i => (s i).ecoord) | |
| hk hadj (.inl j) hj (fun _ hi => PolygonStep.ecoord_nonzero hi) | |
| ((F.polygon_component_sums s hk hz).1 j) | |
| end DirectionFrame | |
| end KaplanskyCounterexample.FiniteGeometry | |
| end | |
| end OAI | |