@@ -1443,7 +1443,7 @@ structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
1443
1443
/-- The sequence of compact sets that form a compact exhaustion. -/
1444
1444
toFun : ℕ → Set X
1445
1445
/-- The sets in the compact exhaustion are in fact compact. -/
1446
- is_compact ' : ∀ n, IsCompact (toFun n)
1446
+ isCompact ' : ∀ n, IsCompact (toFun n)
1447
1447
/-- The sets in the compact exhaustion form a sequence:
1448
1448
each set is contained in the interior of the next. -/
1449
1449
subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1 ))
@@ -1453,29 +1453,33 @@ structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
1453
1453
1454
1454
namespace CompactExhaustion
1455
1455
1456
- -- porting note: todo: use `FunLike`?
1457
- instance : CoeFun (CompactExhaustion α) fun _ => ℕ → Set α :=
1458
- ⟨toFun⟩
1456
+ instance : @RelHomClass (CompactExhaustion α) ℕ (Set α) LE.le HasSubset.Subset where
1457
+ coe := toFun
1458
+ coe_injective' | ⟨_, _, _, _⟩, ⟨_, _, _, _⟩, rfl => rfl
1459
+ map_rel f _ _ h := monotone_nat_of_le_succ
1460
+ (fun n ↦ (f.subset_interior_succ' n).trans interior_subset) h
1459
1461
1460
1462
variable (K : CompactExhaustion α)
1461
1463
1464
+ @[simp]
1465
+ theorem toFun_eq_coe : K.toFun = K := rfl
1466
+
1462
1467
protected theorem isCompact (n : ℕ) : IsCompact (K n) :=
1463
- K.is_compact ' n
1468
+ K.isCompact ' n
1464
1469
#align compact_exhaustion.is_compact CompactExhaustion.isCompact
1465
1470
1466
1471
theorem subset_interior_succ (n : ℕ) : K n ⊆ interior (K (n + 1 )) :=
1467
1472
K.subset_interior_succ' n
1468
1473
#align compact_exhaustion.subset_interior_succ CompactExhaustion.subset_interior_succ
1469
1474
1470
- theorem subset_succ (n : ℕ) : K n ⊆ K (n + 1 ) :=
1471
- Subset.trans (K.subset_interior_succ n) interior_subset
1472
- #align compact_exhaustion.subset_succ CompactExhaustion.subset_succ
1473
-
1474
1475
@[mono]
1475
1476
protected theorem subset ⦃m n : ℕ⦄ (h : m ≤ n) : K m ⊆ K n :=
1476
- show K m ≤ K n from monotone_nat_of_le_succ K.subset_succ h
1477
+ OrderHomClass.mono K h
1477
1478
#align compact_exhaustion.subset CompactExhaustion.subset
1478
1479
1480
+ theorem subset_succ (n : ℕ) : K n ⊆ K (n + 1 ) := K.subset n.le_succ
1481
+ #align compact_exhaustion.subset_succ CompactExhaustion.subset_succ
1482
+
1479
1483
theorem subset_interior ⦃m n : ℕ⦄ (h : m < n) : K m ⊆ interior (K n) :=
1480
1484
Subset.trans (K.subset_interior_succ m) <| interior_mono <| K.subset h
1481
1485
#align compact_exhaustion.subset_interior CompactExhaustion.subset_interior
@@ -1504,7 +1508,7 @@ theorem mem_iff_find_le {x : α} {n : ℕ} : x ∈ K n ↔ K.find x ≤ n :=
1504
1508
/-- Prepend the empty set to a compact exhaustion `K n`. -/
1505
1509
def shiftr : CompactExhaustion α where
1506
1510
toFun n := Nat.casesOn n ∅ K
1507
- is_compact ' n := Nat.casesOn n isCompact_empty K.isCompact
1511
+ isCompact ' n := Nat.casesOn n isCompact_empty K.isCompact
1508
1512
subset_interior_succ' n := Nat.casesOn n (empty_subset _) K.subset_interior_succ
1509
1513
iUnion_eq' := iUnion_eq_univ_iff.2 fun x => ⟨K.find x + 1 , K.mem_find x⟩
1510
1514
#align compact_exhaustion.shiftr CompactExhaustion.shiftr
0 commit comments