Disjoint union of types #
Theorems about the definitions introduced in Init.Data.Sum.Basic
.
@[simp]
theorem
Sum.getLeft?_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → β)
(g : γ → δ)
(x : α ⊕ γ)
:
(Sum.map f g x).getLeft? = Option.map f x.getLeft?
@[simp]
theorem
Sum.getRight?_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → β)
(g : γ → δ)
(x : α ⊕ γ)
:
(Sum.map f g x).getRight? = Option.map g x.getRight?
theorem
Sum.LiftRel.mono
{α✝ : Type u_1}
{α✝¹ : Type u_2}
{r₁ r₂ : α✝ → α✝¹ → Prop}
{β✝ : Type u_3}
{β✝¹ : Type u_4}
{s₁ s₂ : β✝ → β✝¹ → Prop}
{x : α✝ ⊕ β✝}
{y : α✝¹ ⊕ β✝¹}
(hr : ∀ (a : α✝) (b : α✝¹), r₁ a b → r₂ a b)
(hs : ∀ (a : β✝) (b : β✝¹), s₁ a b → s₂ a b)
(h : LiftRel r₁ s₁ x y)
:
LiftRel r₂ s₂ x y
theorem
Sum.liftRel_subrelation_lex
{α✝ : Type u_1}
{r : α✝ → α✝ → Prop}
{β✝ : Type u_2}
{s : β✝ → β✝ → Prop}
:
Subrelation (LiftRel r s) (Lex r s)
theorem
Sum.lex_wf
{α✝ : Type u_1}
{r : α✝ → α✝ → Prop}
{α✝¹ : Type u_2}
{s : α✝¹ → α✝¹ → Prop}
(ha : WellFounded r)
(hb : WellFounded s)
:
WellFounded (Lex r s)
theorem
Sum.elim_const_const
{γ : Sort u_1}
{α : Type u_2}
{β : Type u_3}
(c : γ)
:
Sum.elim (Function.const α c) (Function.const β c) = Function.const (α ⊕ β) c