theorem
L29 ↗range_addCases_prefix
ClassFieldTower.ProP.range_addCases_prefix
Source context 4 commands
Surrounding namespaces, section variables, and local commands at this declaration.
namespace ClassFieldTower.ProP
open ProCGroups ProCGroups.Presentations
noncomputable section
universe uLean source · full declaration
theorem range_addCases_prefix
{F : Type u} {r N : ℕ} (a : Fin r → F) (f : ℕ → F) :
Set.range (Fin.addCases a (fun i : Fin N => f i)) =
Set.range a ∪ f '' (Finset.range N : Set ℕ) := by
ext x
constructor
· rintro ⟨i, rfl⟩
refine Fin.addCases ?_ ?_ i
· intro j
exact Or.inl ⟨j, by simp⟩
· intro j
exact Or.inr ⟨j, by simp, by simp⟩
· rintro (⟨i, rfl⟩ | ⟨n, hn, rfl⟩)
· exact ⟨Fin.castAdd N i, by simp⟩
· refine ⟨Fin.natAdd r ⟨n, by simpa using hn⟩, ?_⟩
exact Fin.addCases_right _