Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting note: added theorem #11431

Closed
pitmonticone opened this issue Mar 16, 2024 · 1 comment
Closed

Porting note: added theorem #11431

pitmonticone opened this issue Mar 16, 2024 · 1 comment
Labels
porting-notes Mathlib3 to Mathlib4 porting notes.

Comments

@pitmonticone
Copy link
Collaborator

pitmonticone commented Mar 16, 2024

Classifies porting notes claiming anything equivalent to:

  • "added theorem"
  • "added theorems"
  • "new theorem"
  • "new theorems"

Examples

-- Porting note: new
@[to_additive (attr := simp)]
theorem lift_ofList (f : α → M) (l : List α) : lift f (ofList l) = (l.map f).prod :=
prodAux_eq _

-- Porting note: new theorem
@[simp]
theorem star_ofNat [NonAssocSemiring R] [StarRing R] (n : ℕ) [n.AtLeastTwo] :
star (no_index (OfNat.ofNat n) : R) = OfNat.ofNat n :=
star_natCast _

-- Porting note: new
@[simp]
theorem nndist_vsub_cancel_left (x y z : P) : nndist (x -ᵥ y) (x -ᵥ z) = nndist y z :=
NNReal.eq <| dist_vsub_cancel_left _ _ _

-- Porting note: new theorem
theorem surjective_of_injective {f : α → α} (hinj : Injective f) : Surjective f := by
intro x
have := Classical.propDecidable
cases nonempty_fintype α
have h₁ : image f univ = univ :=
eq_of_subset_of_card_le (subset_univ _)
((card_image_of_injective univ hinj).symm ▸ le_rfl)
have h₂ : x ∈ image f univ := h₁.symm ▸ mem_univ x
obtain ⟨y, h⟩ := mem_image.1 h₂
exact ⟨y, h.2

@pitmonticone
Copy link
Collaborator Author

Joined with #10756.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
porting-notes Mathlib3 to Mathlib4 porting notes.
Projects
None yet
Development

No branches or pull requests

1 participant