Skip to content

Commit f93df69

Browse files
committed
chore: rename Ulower to ULower (#4430)
ref #4354
1 parent 3ff6ded commit f93df69

File tree

3 files changed

+39
-39
lines changed

3 files changed

+39
-39
lines changed

Mathlib/Computability/Primrec.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ instance finArrow {n} : Primcodable (Fin n → α) :=
11951195
-- ofEquiv _ (Equiv.arrayEquivFin _ _)
11961196
-- #align primcodable.array Primcodable.array
11971197

1198-
section Ulower
1198+
section ULower
11991199

12001200
attribute [local instance] Encodable.decidableRangeEncode Encodable.decidableEqOfEncodable
12011201

@@ -1209,11 +1209,11 @@ theorem mem_range_encode : PrimrecPred (fun n => n ∈ Set.range (encode : α
12091209
(.const _))
12101210
this.of_eq fun _ => decode₂_ne_none_iff
12111211

1212-
instance ulower : Primcodable (Ulower α) :=
1212+
instance ulower : Primcodable (ULower α) :=
12131213
Primcodable.subtype mem_range_encode
12141214
#align primcodable.ulower Primcodable.ulower
12151215

1216-
end Ulower
1216+
end ULower
12171217

12181218
end Primcodable
12191219

@@ -1256,13 +1256,13 @@ theorem option_get {f : α → Option β} {h : ∀ a, (f a).isSome} :
12561256
cases x <;> simp
12571257
#align primrec.option_get Primrec.option_get
12581258

1259-
theorem ulower_down : Primrec (Ulower.down : α → Ulower α) :=
1259+
theorem ulower_down : Primrec (ULower.down : α → ULower α) :=
12601260
letI : ∀ a, Decidable (a ∈ Set.range (encode : α → ℕ)) := decidableRangeEncode _
12611261
subtype_mk .encode
12621262

12631263
#align primrec.ulower_down Primrec.ulower_down
12641264

1265-
theorem ulower_up : Primrec (Ulower.up : Ulower α → α) :=
1265+
theorem ulower_up : Primrec (ULower.up : ULower α → α) :=
12661266
letI : ∀ a, Decidable (a ∈ Set.range (encode : α → ℕ)) := decidableRangeEncode _
12671267
option_get (Primrec.decode₂.comp subtype_val)
12681268
#align primrec.ulower_up Primrec.ulower_up

Mathlib/Computability/Reduce.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ theorem OneOneEquiv.congr_right {α β γ} [Primcodable α] [Primcodable β] [Pr
285285
#align one_one_equiv.congr_right OneOneEquiv.congr_right
286286

287287
@[simp]
288-
theorem Ulower.down_computable {α} [Primcodable α] : (Ulower.equiv α).Computable :=
288+
theorem ULower.down_computable {α} [Primcodable α] : (ULower.equiv α).Computable :=
289289
⟨Primrec.ulower_down.to_comp, Primrec.ulower_up.to_comp⟩
290-
#align ulower.down_computable Ulower.down_computable
290+
#align ulower.down_computable ULower.down_computable
291291

292-
theorem manyOneEquiv_up {α} [Primcodable α] {p : α → Prop} : ManyOneEquiv (p ∘ Ulower.up) p :=
293-
ManyOneEquiv.of_equiv Ulower.down_computable.symm
292+
theorem manyOneEquiv_up {α} [Primcodable α] {p : α → Prop} : ManyOneEquiv (p ∘ ULower.up) p :=
293+
ManyOneEquiv.of_equiv ULower.down_computable.symm
294294
#align many_one_equiv_up manyOneEquiv_up
295295

296296
-- mathport name: «expr ⊕' »

Mathlib/Logic/Encodable/Basic.lean

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ The difference with `Denumerable` is that finite types are encodable. For infini
3030
partial inverse `decode : ℕ → Option α`.
3131
* `decode₂`: Version of `decode` that is equal to `none` outside of the range of `encode`. Useful as
3232
we do not require this in the definition of `decode`.
33-
* `Ulower α`: Any encodable type has an equivalent type living in the lowest universe, namely a
34-
subtype of `ℕ`. `Ulower α` finds it.
33+
* `ULower α`: Any encodable type has an equivalent type living in the lowest universe, namely a
34+
subtype of `ℕ`. `ULower α` finds it.
3535
3636
## Implementation notes
3737
@@ -479,73 +479,73 @@ theorem nonempty_encodable (α : Type _) [Countable α] : Nonempty (Encodable α
479479
instance : Countable ℕ+ := by delta PNat; infer_instance
480480

481481
-- short-circuit instance search
482-
section Ulower
482+
section ULower
483483

484484
attribute [local instance] Encodable.decidableRangeEncode
485485

486486
/-- `ULower α : Type` is an equivalent type in the lowest universe, given `Encodable α`. -/
487-
def Ulower (α : Type _) [Encodable α] : Type :=
487+
def ULower (α : Type _) [Encodable α] : Type :=
488488
Set.range (Encodable.encode : α → ℕ)
489-
#align ulower Ulower
489+
#align ulower ULower
490490

491-
instance {α : Type _} [Encodable α] : DecidableEq (Ulower α) :=
492-
by delta Ulower; exact Encodable.decidableEqOfEncodable _
491+
instance {α : Type _} [Encodable α] : DecidableEq (ULower α) :=
492+
by delta ULower; exact Encodable.decidableEqOfEncodable _
493493

494-
instance {α : Type _} [Encodable α] : Encodable (Ulower α) :=
495-
by delta Ulower; infer_instance
494+
instance {α : Type _} [Encodable α] : Encodable (ULower α) :=
495+
by delta ULower; infer_instance
496496

497-
end Ulower
497+
end ULower
498498

499-
namespace Ulower
499+
namespace ULower
500500

501501
variable (α : Type _) [Encodable α]
502502

503-
/-- The equivalence between the encodable type `α` and `Ulower α : Type`. -/
504-
def equiv : α ≃ Ulower α :=
503+
/-- The equivalence between the encodable type `α` and `ULower α : Type`. -/
504+
def equiv : α ≃ ULower α :=
505505
Encodable.equivRangeEncode α
506-
#align ulower.equiv Ulower.equiv
506+
#align ulower.equiv ULower.equiv
507507

508508
variable {α}
509509

510-
/-- Lowers an `a : α` into `Ulower α`. -/
511-
def down (a : α) : Ulower α :=
510+
/-- Lowers an `a : α` into `ULower α`. -/
511+
def down (a : α) : ULower α :=
512512
equiv α a
513-
#align ulower.down Ulower.down
513+
#align ulower.down ULower.down
514514

515-
instance [Inhabited α] : Inhabited (Ulower α) :=
515+
instance [Inhabited α] : Inhabited (ULower α) :=
516516
⟨down default⟩
517517

518-
/-- Lifts an `a : Ulower α` into `α`. -/
519-
def up (a : Ulower α) : α :=
518+
/-- Lifts an `a : ULower α` into `α`. -/
519+
def up (a : ULower α) : α :=
520520
(equiv α).symm a
521-
#align ulower.up Ulower.up
521+
#align ulower.up ULower.up
522522

523523
@[simp]
524-
theorem down_up {a : Ulower α} : down a.up = a :=
524+
theorem down_up {a : ULower α} : down a.up = a :=
525525
Equiv.right_inv _ _
526-
#align ulower.down_up Ulower.down_up
526+
#align ulower.down_up ULower.down_up
527527

528528
@[simp]
529529
theorem up_down {a : α} : (down a).up = a := by
530530
simp [up, down,Equiv.left_inv _ _, Equiv.symm_apply_apply]
531-
#align ulower.up_down Ulower.up_down
531+
#align ulower.up_down ULower.up_down
532532

533533
@[simp]
534-
theorem up_eq_up {a b : Ulower α} : a.up = b.up ↔ a = b :=
534+
theorem up_eq_up {a b : ULower α} : a.up = b.up ↔ a = b :=
535535
Equiv.apply_eq_iff_eq _
536-
#align ulower.up_eq_up Ulower.up_eq_up
536+
#align ulower.up_eq_up ULower.up_eq_up
537537

538538
@[simp]
539539
theorem down_eq_down {a b : α} : down a = down b ↔ a = b :=
540540
Equiv.apply_eq_iff_eq _
541-
#align ulower.down_eq_down Ulower.down_eq_down
541+
#align ulower.down_eq_down ULower.down_eq_down
542542

543543
@[ext]
544-
protected theorem ext {a b : Ulower α} : a.up = b.up → a = b :=
544+
protected theorem ext {a b : ULower α} : a.up = b.up → a = b :=
545545
up_eq_up.1
546-
#align ulower.ext Ulower.ext
546+
#align ulower.ext ULower.ext
547547

548-
end Ulower
548+
end ULower
549549

550550
/-
551551
Choice function for encodable types and decidable predicates.

0 commit comments

Comments
 (0)