Offline · exact source
Exact Lean source

YoungRSKShape

formalization/Cloning/YoungRSKShape.lean

Source hash: e9bea4737b82dfb62603ecb333101a5d3ab8d48cb49502574503c74cb13c1345

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
1import Cloning.YoungRSKContent
2 
3/-! Elementary shape facts for the one-box insertion bijection. -/
4 
5noncomputable section
6open scoped BigOperators Classical
7namespace Cloning.YoungGeneral
8 
9noncomputable def shapeRemovable : List ℕ → ℕ → Prop
10  | [], _ => False
11  | m :: M, 0 => 0 < m ∧ ∀ n ∈ M.head?, n < m
12  | _ :: M, r + 1 => shapeRemovable M r
13 
14theorem shapeAdd_injective_of_length {M K : List ℕ} (h : M.length = K.length)
15    (r : ℕ) (he : shapeAdd M r = shapeAdd K r) : M = K := by
16  induction M generalizing K r with
17  | nil => simpa using h.symm
18  | cons m M ih =>
19    cases K with
20    | nil => simp at h
21    | cons k K =>
22      have hlen : M.length = K.length := by simpa using h
23      cases r with
24      | zero =>
25        simp only [shapeAdd, List.cons.injEq] at he
26        obtain ⟨hm, hM⟩ := he
27        have : m = k := by omega
28        simp [this, hM]
29      | succ r =>
30        simp only [shapeAdd, List.cons.injEq] at he
31        exact congrArg₂ List.cons he.1 (ih hlen r he.2)
32 
33theorem shapeRemovable_shapeAdd (M : List ℕ)
34    (hM : List.Pairwise (fun a b => b ≤ a) M) (r : ℕ) (hr : r < M.length) :
35    shapeRemovable (shapeAdd M r) r := by
36  induction M generalizing r with
37  | nil => simp at hr
38  | cons m M ih =>
39    obtain ⟨hm, hM⟩ := List.pairwise_cons.mp hM
40    cases r with
41    | zero =>
42      simp only [shapeAdd, shapeRemovable]
43      refine ⟨by omega, ?_⟩
44      intro n hn
45      have hmem : n ∈ M := List.mem_of_mem_head? hn
46      have := hm n hmem
47      omega
48    | succ r =>
49      exact ih hM r (by simpa using hr)
50 
51theorem shapeRemovable_addBox {d : ℕ} (μ : Fin d → ℕ) (hμ : Antitone μ)
52    (r : Fin d) : shapeRemovable (List.ofFn (addBox μ r)) r.val := by
53  rw [← shapeAdd_ofFn]
54  exact shapeRemovable_shapeAdd _
55    (List.pairwise_ofFn.mpr (fun _ _ h => hμ h.le)) _ (by simp)
56 
57end Cloning.YoungGeneral