Adding both ⊥ and ⊤ to a type #
This files defines an abbreviation WithBotTop ι for WithBot (WithTop ι).
We also introduce an abbreviation EInt for WithBotTop ℤ.
@[reducible, inline]
The type obtained by adding both ⊥ and ⊤ to a type.
Equations
- WithBotTop ι = WithBot (WithTop ι)
Instances For
@[reducible, inline]
The type obtained by adding both ⊤ and ⊥ to a type.
Equations
- WithTopBot ι = WithTop (WithBot ι)
Instances For
@[instance_reducible]
Equations
- WithBotTop.instCoe = { coe := WithBotTop.coe }
def WithBotTop.rec {ι : Type u_1} {motive : WithBotTop ι → Sort u_2} (bot : motive ⊥) (coe : (a : ι) → motive (coe a)) (top : motive ⊤) (a : WithBotTop ι) :
motive a
A recursor for WithBotTop in terms of the coercion.
Equations
- WithBotTop.rec bot coe top none = bot
- WithBotTop.rec bot coe top (some (some a)) = coe a
- WithBotTop.rec bot coe top (some none) = top
Instances For
@[simp]
theorem WithBotTop.rec_bot {ι : Type u_1} {motive : WithBotTop ι → Sort u_2} (bot : motive ⊥) (coe : (a : ι) → motive (coe a)) (top : motive ⊤) :
@[simp]
theorem WithBotTop.rec_coe {ι : Type u_1} {motive : WithBotTop ι → Sort u_2} (bot : motive ⊥) (coe : (a : ι) → motive (coe a)) (top : motive ⊤) (a : ι) :
@[simp]
theorem WithBotTop.rec_top {ι : Type u_1} {motive : WithBotTop ι → Sort u_2} (bot : motive ⊥) (coe : (a : ι) → motive (coe a)) (top : motive ⊤) :