Skip to content

Commit

Permalink
lint(various): nolint has_inhabited_instance for injective functions (#…
Browse files Browse the repository at this point in the history
…4541)

`function.embedding`, `homeomorph`, `isometric` represent injective/bijective functions, so it's silly to expect them to be inhabited.
  • Loading branch information
hrmacbeth committed Oct 9, 2020
1 parent cc75e4e commit d0f45f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/logic/embedding.lean
Expand Up @@ -15,6 +15,7 @@ universes u v w x
namespace function

/-- `α ↪ β` is a bundled injective function. -/
@[nolint has_inhabited_instance] -- depending on cardinalities, an injective function may not exist
structure embedding (α : Sort*) (β : Sort*) :=
(to_fun : α → β)
(inj' : injective to_fun)
Expand Down
1 change: 1 addition & 0 deletions src/topology/homeomorph.lean
Expand Up @@ -10,6 +10,7 @@ open set
variables {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}

/-- α and β are homeomorph, also called topological isomoph -/
@[nolint has_inhabited_instance] -- not all spaces are homeomorphic to each other
structure homeomorph (α : Type*) (β : Type*) [topological_space α] [topological_space β]
extends α ≃ β :=
(continuous_to_fun : continuous to_fun . tactic.interactive.continuity')
Expand Down
1 change: 1 addition & 0 deletions src/topology/metric_space/isometry.lean
Expand Up @@ -111,6 +111,7 @@ lemma isometry.diam_range [metric_space α] [metric_space β] {f : α → β} (h
by { rw ← image_univ, exact hf.diam_image univ }

/-- `α` and `β` are isometric if there is an isometric bijection between them. -/
@[nolint has_inhabited_instance] -- such a bijection need not exist
structure isometric (α : Type*) (β : Type*) [emetric_space α] [emetric_space β]
extends α ≃ β :=
(isometry_to_fun : isometry to_fun)
Expand Down

0 comments on commit d0f45f5

Please sign in to comment.