Lean / Reader
Lean readerCutConsequences.lean
Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports TwoCopy, OddCycles, which it does not have: you can read it there, but it will not check. Build the project itself to check it.
import TwoCopyimport OddCyclesopen SimpleGraph SimpleGraph.Walknamespace TerminalCyclesuniverse uvariable {V W Z : Type u} [Finite V] [Finite W]/-- The arithmetic and odd-cycle conclusions of iis:2611.00573 now followfrom the structural hypotheses, with no sum test assumed. -/theorem cut_side_conclusions (A : SimpleGraph V) (G : SimpleGraph Z)(f : A ↪g G) {a x : V} (ne : x ≠ a) (da : 2 ≤ valence A a) (dx : 2 ≤ valence A x)(rest : ∀ v, v ≠ a → v ≠ x → 3 ≤ valence A v) (balanced : Nat.card Z=2*Nat.card V+1)(absent : ¬ hasPowerCycle G) (minimal : smaller_graphs_have_cycle G) :sumTests (lengths A a x) ∧ (∃ v, ∃ p : A.Walk v v, p.IsCycle ∧ p.length % 2 = 1) ∧∀ r : Fin 3, ¬ ∀ i ∈ lengths A a x, i % 3 = r.val := byhave tests := cut_side_sum_tests A G f ne da dx rest balanced absent minimalexact ⟨tests,odd_cycle_of_sum_tests tests, no_constant_residue _ tests⟩/-- The two original sides provide two vertex-disjoint odd simple cyclesin the ambient graph. Their disjointness is about the support after embedding. -/theorem cut_disjoint_odd_cycles (A : SimpleGraph V) (B : SimpleGraph W) (G : SimpleGraph Z)(f : A ↪g G) (g : B ↪g G) (apart : ∀ v w, f v ≠ g w){a x : V} {b y : W} (left : TerminalSide A a x) (right : TerminalSide B b y)(da : 2 ≤ valence A a) (db : 2 ≤ valence B b)(balanceA : Nat.card Z=2*Nat.card V+1) (balanceB : Nat.card Z=2*Nat.card W+1)(minimal : smaller_graphs_have_cycle G) :∃ (v w : Z) (p : G.Walk v v) (q : G.Walk w w), p.IsCycle ∧ q.IsCycle ∧p.length%2=1 ∧ q.length%2=1 ∧ ∀ z ∈ p.support, z ∉ q.support := byhave testA : sumTests (lengths A a x) := mixed_sum_tests A A G left left da da (by omega) minimalhave testB : sumTests (lengths B b y) := mixed_sum_tests B B G right right db db (by omega) minimalobtain ⟨v,p,hp,pos⟩ := odd_cycle_of_sum_tests testAobtain ⟨w,q,hq,odd⟩ := odd_cycle_of_sum_tests testBrefine ⟨f v,g w,p.map f.toHom,q.map g.toHom,hp.map f.injective,hq.map g.injective,by simpa using pos,by simpa using odd,?_⟩intro z h1 h2rw [Walk.support_map,List.mem_map] at h1 h2obtain ⟨i,_,hi⟩ := h1obtain ⟨j,_,hj⟩ := h2exact apart i j (hi.trans hj.symm)end TerminalCycles