Skip to content

Commit ada69fd

Browse files
committed
chore(Nobeling): drop unneeded [Inhabited I] assumptions (#11310)
1 parent 5552411 commit ada69fd

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Mathlib/Topology/Category/Profinite/Nobeling.lean

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace Profinite
4949

5050
namespace NobelingProof
5151

52-
variable {I : Type u} [Inhabited I] [LinearOrder I] [IsWellOrder I (·<·)] (C : Set (I → Bool))
52+
variable {I : Type u} [LinearOrder I] [IsWellOrder I (·<·)] (C : Set (I → Bool))
5353

5454
open Profinite ContinuousMap CategoryTheory Limits Opposite Submodule
5555

@@ -327,10 +327,11 @@ product "good".
327327
def isGood (l : Products I) : Prop :=
328328
l.eval C ∉ Submodule.span ℤ ((Products.eval C) '' {m | m < l})
329329

330-
theorem rel_head!_of_mem {i : I} {l : Products I} (hi : i ∈ l.val) : i ≤ l.val.head! :=
330+
theorem rel_head!_of_mem [Inhabited I] {i : I} {l : Products I} (hi : i ∈ l.val) :
331+
i ≤ l.val.head! :=
331332
List.Sorted.le_head! (List.chain'_iff_pairwise.mp l.prop) hi
332333

333-
theorem head!_le_of_lt {q l : Products I} (h : q < l) (hq : q.val ≠ []) :
334+
theorem head!_le_of_lt [Inhabited I] {q l : Products I} (h : q < l) (hq : q.val ≠ []) :
334335
q.val.head! ≤ l.val.head! :=
335336
List.head!_le_of_lt l.val q.val h hq
336337

@@ -774,10 +775,8 @@ theorem Products.lt_nil_empty : { m : Products I | m < Products.nil } = ∅ := b
774775
refine ⟨fun h ↦ ?_, by tauto⟩
775776
simp only [Set.mem_setOf_eq, lt_iff_lex_lt, nil, List.Lex.not_nil_right] at h
776777

777-
instance {α : Type*} [TopologicalSpace α] [Inhabited α] : Nontrivial (LocallyConstant α ℤ) := by
778-
refine ⟨0, 1, fun h ↦ ?_⟩
779-
apply @zero_ne_one ℤ
780-
exact DFunLike.congr_fun h default
778+
instance {α : Type*} [TopologicalSpace α] [Nonempty α] : Nontrivial (LocallyConstant α ℤ) :=
779+
0, 1, ne_of_apply_ne DFunLike.coe <| (Function.const_injective (β := ℤ)).ne zero_ne_one⟩
781780

782781
theorem Products.isGood_nil : Products.isGood ({fun _ ↦ false} : Set (I → Bool)) Products.nil := by
783782
intro h
@@ -929,7 +928,7 @@ theorem eval_πs_image' {l : Products I} {o₁ o₂ : Ordinal} (h : o₁ ≤ o
929928
apply and_congr_right; intro hm
930929
rw [eval_πs' C h (lt_ord_of_lt hm hl)]
931930

932-
theorem head_lt_ord_of_isGood {l : Products I} {o : Ordinal}
931+
theorem head_lt_ord_of_isGood [Inhabited I] {l : Products I} {o : Ordinal}
933932
(h : l.isGood (π C (ord I · < o))) (hn : l.val ≠ []) : ord I (l.val.head!) < o :=
934933
prop_of_isGood C (ord I · < o) h l.val.head! (List.head!_mem_self hn)
935934

@@ -1474,18 +1473,18 @@ theorem mem_C'_eq_false : ∀ x, x ∈ C' C ho → x (term I ho) = false := by
14741473
def Products.Tail (l : Products I) : Products I :=
14751474
⟨l.val.tail, List.Chain'.tail l.prop⟩
14761475

1477-
theorem Products.max_eq_o_cons_tail (l : Products I) (hl : l.val ≠ [])
1476+
theorem Products.max_eq_o_cons_tail [Inhabited I] (l : Products I) (hl : l.val ≠ [])
14781477
(hlh : l.val.head! = term I ho) : l.val = term I ho :: l.Tail.val := by
14791478
rw [← List.cons_head!_tail hl, hlh]
14801479
rfl
14811480

1482-
theorem Products.max_eq_o_cons_tail' (l : Products I) (hl : l.val ≠ [])
1481+
theorem Products.max_eq_o_cons_tail' [Inhabited I] (l : Products I) (hl : l.val ≠ [])
14831482
(hlh : l.val.head! = term I ho) (hlc : List.Chain' (·>·) (term I ho :: l.Tail.val)) :
14841483
l = ⟨term I ho :: l.Tail.val, hlc⟩ := by
14851484
simp_rw [← max_eq_o_cons_tail ho l hl hlh]
14861485
rfl
14871486

1488-
theorem GoodProducts.head!_eq_o_of_maxProducts (l : ↑(MaxProducts C ho)) :
1487+
theorem GoodProducts.head!_eq_o_of_maxProducts [Inhabited I] (l : ↑(MaxProducts C ho)) :
14891488
l.val.val.head! = term I ho := by
14901489
rw [eq_comm, ← ord_term ho]
14911490
have hm := l.prop.2
@@ -1500,6 +1499,7 @@ theorem GoodProducts.head!_eq_o_of_maxProducts (l : ↑(MaxProducts C ho)) :
15001499

15011500
theorem GoodProducts.max_eq_o_cons_tail (l : MaxProducts C ho) :
15021501
l.val.val = (term I ho) :: l.val.Tail.val :=
1502+
have : Inhabited I := ⟨term I ho⟩
15031503
Products.max_eq_o_cons_tail ho l.val (List.ne_nil_of_mem l.prop.2)
15041504
(head!_eq_o_of_maxProducts _ hsC ho l)
15051505

@@ -1508,7 +1508,7 @@ theorem Products.evalCons {l : List I} {a : I}
15081508
(e C a) * Products.eval C ⟨l,List.Chain'.sublist hla (List.tail_sublist (a::l))⟩ := by
15091509
simp only [eval._eq_1, List.map, List.prod_cons]
15101510

1511-
theorem Products.max_eq_eval (l : Products I) (hl : l.val ≠ [])
1511+
theorem Products.max_eq_eval [Inhabited I] (l : Products I) (hl : l.val ≠ [])
15121512
(hlh : l.val.head! = term I ho) :
15131513
Linear_CC' C hsC ho (l.eval C) = l.Tail.eval (C' C ho) := by
15141514
have hlc : ((term I ho) :: l.Tail.val).Chain' (·>·) := by
@@ -1542,6 +1542,7 @@ namespace GoodProducts
15421542

15431543
theorem max_eq_eval (l : MaxProducts C ho) :
15441544
Linear_CC' C hsC ho (l.val.eval C) = l.val.Tail.eval (C' C ho) :=
1545+
have : Inhabited I := ⟨term I ho⟩
15451546
Products.max_eq_eval _ _ _ _ (List.ne_nil_of_mem l.prop.2)
15461547
(head!_eq_o_of_maxProducts _ hsC ho l)
15471548

@@ -1554,6 +1555,7 @@ theorem max_eq_eval_unapply :
15541555
theorem chain'_cons_of_lt (l : MaxProducts C ho)
15551556
(q : Products I) (hq : q < l.val.Tail) :
15561557
List.Chain' (fun x x_1 ↦ x > x_1) (term I ho :: q.val) := by
1558+
have : Inhabited I := ⟨term I ho⟩
15571559
rw [List.chain'_iff_pairwise]
15581560
simp only [gt_iff_lt, List.pairwise_cons]
15591561
refine ⟨fun a ha ↦ lt_of_le_of_lt (Products.rel_head!_of_mem ha) ?_,
@@ -1568,6 +1570,7 @@ theorem chain'_cons_of_lt (l : MaxProducts C ho)
15681570

15691571
theorem good_lt_maxProducts (q : GoodProducts (π C (ord I · < o)))
15701572
(l : MaxProducts C ho) : List.Lex (·<·) q.val.val l.val.val := by
1573+
have : Inhabited I := ⟨term I ho⟩
15711574
by_cases h : q.val.val = []
15721575
· rw [h, max_eq_o_cons_tail C hsC ho l]
15731576
exact List.Lex.nil
@@ -1584,6 +1587,7 @@ Removing the leading `o` from a term of `MaxProducts C` yields a list which `is
15841587
theorem maxTail_isGood (l : MaxProducts C ho)
15851588
(h₁: ⊤ ≤ Submodule.span ℤ (Set.range (eval (π C (ord I · < o))))) :
15861589
l.val.Tail.isGood (C' C ho) := by
1590+
have : Inhabited I := ⟨term I ho⟩
15871591
-- Write `l.Tail` as a linear combination of smaller products:
15881592
intro h
15891593
rw [Finsupp.mem_span_image_iff_total, ← max_eq_eval C hsC ho] at h
@@ -1799,6 +1803,6 @@ open Profinite NobelingProof
17991803
/-- Nöbeling's theorem: the `ℤ`-module `LocallyConstant S ℤ` is free for every `S : Profinite` -/
18001804
instance LocallyConstant.freeOfProfinite (S : Profinite.{u}) :
18011805
Module.Free ℤ (LocallyConstant S ℤ) :=
1802-
@Nobeling_aux {C : Set S // IsClopen C} ⟨⟨∅, isClopen_empty⟩⟩
1806+
@Nobeling_aux {C : Set S // IsClopen C}
18031807
(IsWellOrder.linearOrder WellOrderingRel) WellOrderingRel.isWellOrder
18041808
S (Nobeling.ι S) (Nobeling.embedding S)

0 commit comments

Comments
 (0)