Skip to content

Commit 185be8f

Browse files
committed
feat: cardinalities in specific inverse systems (#18067)
We compute the cardinality of each node in an inverse system `F i` indexed by a well-order in which every map between successive nodes has constant fiber `X i`, and every limit node is the `limit` of the inverse subsystem formed by all previous nodes. (To avoid importing `Cardinal`, we in fact construct a bijection rather than stating the result in terms of `Cardinal.mk`.) Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
1 parent c5adc80 commit 185be8f

File tree

8 files changed

+349
-36
lines changed

8 files changed

+349
-36
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3784,6 +3784,7 @@ import Mathlib.Order.CountableDenseLinearOrder
37843784
import Mathlib.Order.Cover
37853785
import Mathlib.Order.Defs
37863786
import Mathlib.Order.Directed
3787+
import Mathlib.Order.DirectedInverseSystem
37873788
import Mathlib.Order.Disjoint
37883789
import Mathlib.Order.Disjointed
37893790
import Mathlib.Order.Estimator

Mathlib/Algebra/DirectLimit.lean

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Mathlib.LinearAlgebra.Quotient.Basic
99
import Mathlib.RingTheory.FreeCommRing
1010
import Mathlib.RingTheory.Ideal.Maps
1111
import Mathlib.RingTheory.Ideal.Quotient.Defs
12+
import Mathlib.Order.DirectedInverseSystem
1213
import Mathlib.Tactic.SuppressCompilation
1314

1415
/-!
@@ -43,24 +44,6 @@ variable {ι : Type v}
4344
variable [Preorder ι]
4445
variable (G : ι → Type w)
4546

46-
/-- A directed system is a functor from a category (directed poset) to another category. -/
47-
class DirectedSystem (f : ∀ i j, i ≤ j → G i → G j) : Prop where
48-
map_self' : ∀ i x h, f i i h x = x
49-
map_map' : ∀ {i j k} (hij hjk x), f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x
50-
51-
section
52-
53-
variable {G}
54-
variable (f : ∀ i j, i ≤ j → G i → G j) [DirectedSystem G fun i j h => f i j h]
55-
56-
theorem DirectedSystem.map_self i x h : f i i h x = x :=
57-
DirectedSystem.map_self' i x h
58-
theorem DirectedSystem.map_map {i j k} (hij hjk x) :
59-
f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x :=
60-
DirectedSystem.map_map' hij hjk x
61-
62-
end
63-
6447
namespace Module
6548

6649
variable [∀ i, AddCommGroup (G i)] [∀ i, Module R (G i)]
@@ -71,13 +54,13 @@ variable (f : ∀ i j, i ≤ j → G i →ₗ[R] G j)
7154
`fun i j h ↦ f i j h` can confuse the simplifier. -/
7255
nonrec theorem DirectedSystem.map_self [DirectedSystem G fun i j h => f i j h] (i x h) :
7356
f i i h x = x :=
74-
DirectedSystem.map_self (fun i j h => f i j h) i x h
57+
DirectedSystem.map_self (f := (f · · ·)) x
7558

7659
/-- A copy of `DirectedSystem.map_map` specialized to linear maps, as otherwise the
7760
`fun i j h ↦ f i j h` can confuse the simplifier. -/
7861
nonrec theorem DirectedSystem.map_map [DirectedSystem G fun i j h => f i j h] {i j k} (hij hjk x) :
7962
f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x :=
80-
DirectedSystem.map_map (fun i j h => f i j h) hij hjk x
63+
DirectedSystem.map_map (f := (f · · ·)) hij hjk x
8164

8265
variable (G)
8366

@@ -649,7 +632,7 @@ theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} [DecidablePred (
649632
restriction_of, dif_pos (hst hps), lift_of]
650633
dsimp only
651634
-- Porting note: Lean 3 could get away with far fewer hints for inputs in the line below
652-
have := DirectedSystem.map_map (fun i j h => f' i j h) (hj p hps) hjk
635+
have := DirectedSystem.map_map (f := (f' · · ·)) (hj p hps) hjk
653636
rw [this]
654637
· rintro x y ihx ihy
655638
rw [(restriction _).map_add, (FreeCommRing.lift _).map_add, (f' j k hjk).map_add, ihx, ihy,
@@ -678,7 +661,7 @@ theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCom
678661
restriction_of, dif_pos, lift_of, lift_of]
679662
on_goal 1 =>
680663
dsimp only
681-
have := DirectedSystem.map_map (fun i j h => f' i j h) hij (le_refl j : j ≤ j)
664+
have := DirectedSystem.map_map (f := (f' · · ·)) hij le_rfl
682665
rw [this]
683666
· exact sub_self _
684667
exacts [Or.inl rfl, Or.inr rfl]

Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ theorem Step.isIntegral (n) : ∀ z : Step k n, IsIntegral k z := by
245245
· convert h -- Porting note: This times out at 500000
246246

247247
instance toStepOfLE.directedSystem : DirectedSystem (Step k) fun i j h => toStepOfLE k i j h :=
248-
fun _ x _ => Nat.leRecOn_self x, fun h₁₂ h₂₃ x => (Nat.leRecOn_trans h₁₂ h₂₃ x).symm⟩
248+
fun _ => Nat.leRecOn_self, fun _ _ _ h₁₂ h₂₃ x => (Nat.leRecOn_trans h₁₂ h₂₃ x).symm⟩
249249

250250
end AlgebraicClosure
251251

Mathlib/Logic/Equiv/Basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,14 @@ theorem piCongr'_symm_apply_symm_apply (f : ∀ b, Z b) (b : β) :
17171717

17181718
end
17191719

1720+
/-- Transport dependent functions through an equality of sets. -/
1721+
@[simps!] def piCongrSet {α} {W : α → Sort w} {s t : Set α} (h : s = t) :
1722+
(∀ i : {i // i ∈ s}, W i) ≃ (∀ i : {i // i ∈ t}, W i) where
1723+
toFun f i := f ⟨i, h ▸ i.2
1724+
invFun f i := f ⟨i, h.symm ▸ i.2
1725+
left_inv f := rfl
1726+
right_inv f := rfl
1727+
17201728
section BinaryOp
17211729

17221730
variable {α₁ β₁ : Type*} (e : α₁ ≃ β₁) (f : α₁ → α₁ → α₁)

Mathlib/ModelTheory/DirectLimit.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Copyright (c) 2022 Aaron Anderson. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Aaron Anderson, Gabin Kolly
55
-/
6+
import Mathlib.Data.Finite.Sum
67
import Mathlib.Data.Fintype.Order
7-
import Mathlib.Algebra.DirectLimit
8-
import Mathlib.ModelTheory.Quotients
98
import Mathlib.ModelTheory.FinitelyGenerated
10-
import Mathlib.Data.Finite.Sum
9+
import Mathlib.ModelTheory.Quotients
10+
import Mathlib.Order.DirectedInverseSystem
1111

1212
/-!
1313
# Direct Limits of First-Order Structures
@@ -45,13 +45,13 @@ namespace DirectedSystem
4545
/-- A copy of `DirectedSystem.map_self` specialized to `L`-embeddings, as otherwise the
4646
`fun i j h ↦ f i j h` can confuse the simplifier. -/
4747
nonrec theorem map_self [DirectedSystem G fun i j h => f i j h] (i x h) : f i i h x = x :=
48-
DirectedSystem.map_self (fun i j h => f i j h) i x h
48+
DirectedSystem.map_self (f := (f · · ·)) x
4949

5050
/-- A copy of `DirectedSystem.map_map` specialized to `L`-embeddings, as otherwise the
5151
`fun i j h ↦ f i j h` can confuse the simplifier. -/
5252
nonrec theorem map_map [DirectedSystem G fun i j h => f i j h] {i j k} (hij hjk x) :
5353
f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x :=
54-
DirectedSystem.map_map (fun i j h => f i j h) hij hjk x
54+
DirectedSystem.map_map (f := (f · · ·)) hij hjk x
5555

5656
variable {G' : ℕ → Type w} [∀ i, L.Structure (G' i)] (f' : ∀ n : ℕ, G' n ↪[L] G' (n + 1))
5757

@@ -73,8 +73,8 @@ theorem coe_natLERec (m n : ℕ) (h : m ≤ n) :
7373
Embedding.comp_apply, ih]
7474

7575
instance natLERec.directedSystem : DirectedSystem G' fun i j h => natLERec f' i j h :=
76-
fun _ _ _ => congr (congr rfl (Nat.leRecOn_self _)) rfl,
77-
fun hij hjk => by simp [Nat.leRecOn_trans hij hjk]⟩
76+
fun _ _ => congr (congr rfl (Nat.leRecOn_self _)) rfl,
77+
fun _ _ _ hij hjk => by simp [Nat.leRecOn_trans hij hjk]⟩
7878

7979
end DirectedSystem
8080

@@ -444,8 +444,8 @@ variable [Nonempty ι] [IsDirected ι (· ≤ ·)]
444444
variable {M N : Type*} [L.Structure M] [L.Structure N] (S : ι →o L.Substructure M)
445445

446446
instance : DirectedSystem (fun i ↦ S i) (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) where
447-
map_self' := fun _ _ _ ↦ rfl
448-
map_map' := fun _ _ _ rfl
447+
map_self _ _ := rfl
448+
map_map _ _ _ _ _ _ := rfl
449449

450450
namespace DirectLimit
451451

Mathlib/ModelTheory/PartialEquiv.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,13 @@ variable (S : ι →o M ≃ₚ[L] N)
303303

304304
instance : DirectedSystem (fun i ↦ (S i).dom)
305305
(fun _ _ h ↦ Substructure.inclusion (dom_le_dom (S.monotone h))) where
306-
map_self' := fun _ _ _ ↦ rfl
307-
map_map' := fun _ _ _ rfl
306+
map_self _ _ := rfl
307+
map_map _ _ _ _ _ _ := rfl
308308

309309
instance : DirectedSystem (fun i ↦ (S i).cod)
310310
(fun _ _ h ↦ Substructure.inclusion (cod_le_cod (S.monotone h))) where
311-
map_self' := fun _ _ _ ↦ rfl
312-
map_map' := fun _ _ _ rfl
311+
map_self _ _ := rfl
312+
map_map _ _ _ _ _ _ := rfl
313313

314314
/-- The limit of a directed system of PartialEquivs. -/
315315
noncomputable def partialEquivLimit : M ≃ₚ[L] N where

0 commit comments

Comments
 (0)