Skip to content

Commit ed2e113

Browse files
authored
Merge pull request #279 from gaearon/patch-7
Fill in Fin_equiv_Fin
2 parents e89893e + 71da778 commit ed2e113

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

analysis/Analysis/Section_3_5.lean

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,12 @@ abbrev SetTheory.Set.Fin_embed (n N:ℕ) (h: n ≤ N) (i: Fin n) : Fin N := ⟨
309309
obtain ⟨ m, hm, im ⟩ := this; use m, by linarith
310310
311311

312-
/--
313-
I suspect that this equivalence is non-computable and requires classical logic,
314-
unless there is a clever trick.
315-
-/
316-
noncomputable abbrev SetTheory.Set.Fin_equiv_Fin (n:ℕ) : Fin n ≃ _root_.Fin n where
317-
toFun := sorry
318-
invFun := sorry
319-
left_inv := sorry
320-
right_inv := sorry
312+
/-- Connections with Mathlib's `Fin n` -/
313+
noncomputable abbrev SetTheory.Set.Fin.Fin_equiv_Fin (n:ℕ) : Fin n ≃ _root_.Fin n where
314+
toFun := fun m ↦ _root_.Fin.mk m (toNat_lt m)
315+
invFun := fun m ↦ Fin_mk n m.val m.isLt
316+
left_inv := by intro m; exact (toNat_spec m).2.symm
317+
right_inv := by intro m; simp
321318

322319
/-- Lemma 3.5.11 (finite choice) -/
323320
theorem SetTheory.Set.finite_choice {n:ℕ} {X: Fin n → Set} (h: ∀ i, X i ≠ ∅) : iProd X ≠ ∅ := by

0 commit comments

Comments
 (0)