File: Mathlib/Data/TwoPointing.lean

full_name: TwoPointing.fst_ne_snd
code: /-- Two-pointing of a type. This is a Type-valued termed `Nontrivial`. -/
@[ext]
structure TwoPointing (α : Type*) extends α × α where
  /-- `fst` and `snd` are distinct terms -/
  fst_ne_snd : fst ≠ snd
  deriving DecidableEq
goal: self.fst ≠ self.snd

full_name: TwoPointing
code: /-- Two-pointing of a type. This is a Type-valued termed `Nontrivial`. -/
@[ext]
structure TwoPointing (α : Type*) extends α × α where
  /-- `fst` and `snd` are distinct terms -/
  fst_ne_snd : fst ≠ snd
  deriving DecidableEq
goal: Type u_3

full_name: TwoPointing.snd_ne_fst
code: theorem snd_ne_fst : p.snd ≠ p.fst 
goal: p.snd ≠ p.fst

full_name: TwoPointing.swap_toProd
code: /-- Swaps the two pointed elements. -/
@[simps]
def swap : TwoPointing α 
goal: p.swap.toProd = (p.snd, p.fst)

full_name: TwoPointing.swap
code: /-- Swaps the two pointed elements. -/
@[simps]
def swap : TwoPointing α 
goal: TwoPointing α

full_name: TwoPointing.swap_fst
code: theorem swap_fst : p.swap.fst = p.snd 
goal: p.swap.fst = p.snd

full_name: TwoPointing.swap_snd
code: theorem swap_snd : p.swap.snd = p.fst 
goal: p.swap.snd = p.fst

full_name: TwoPointing.swap_swap
code: @[simp]
theorem swap_swap : p.swap.swap = p 
goal: p.swap.swap = p

full_name: TwoPointing.to_nontrivial
code: theorem to_nontrivial : Nontrivial α 
goal: Nontrivial α

full_name: TwoPointing.instNonemptyOfNontrivial
code: instance [Nontrivial α] : Nonempty (TwoPointing α) 
goal: Nonempty (TwoPointing α)

full_name: TwoPointing.nonempty_two_pointing_iff
code: @[simp]
theorem nonempty_two_pointing_iff : Nonempty (TwoPointing α) ↔ Nontrivial α 
goal: Nonempty (TwoPointing α) ↔ Nontrivial α

full_name: TwoPointing.pi
code: /-- The two-pointing of constant functions. -/
def pi : TwoPointing (α → β) 
goal: TwoPointing (α → β)

full_name: TwoPointing.pi_fst
code: @[simp]
theorem pi_fst : (q.pi α).fst = const α q.fst 
goal: (TwoPointing.pi α q).fst = Function.const α q.fst

full_name: TwoPointing.pi_snd
code: @[simp]
theorem pi_snd : (q.pi α).snd = const α q.snd 
goal: (TwoPointing.pi α q).snd = Function.const α q.snd

full_name: TwoPointing.prod
code: /-- The product of two two-pointings. -/
def prod : TwoPointing (α × β) 
goal: TwoPointing (α × β)

full_name: TwoPointing.prod_fst
code: @[simp]
theorem prod_fst : (p.prod q).fst = (p.fst, q.fst) 
goal: (p.prod q).fst = (p.fst, q.fst)

full_name: TwoPointing.prod_snd
code: @[simp]
theorem prod_snd : (p.prod q).snd = (p.snd, q.snd) 
goal: (p.prod q).snd = (p.snd, q.snd)

full_name: TwoPointing.sum
code: /-- The sum of two pointings. Keeps the first point from the left and the second point from the
right. -/
protected def sum : TwoPointing (α ⊕ β) 
goal: TwoPointing (α ⊕ β)

full_name: TwoPointing.sum_fst
code: @[simp]
theorem sum_fst : (p.sum q).fst = Sum.inl p.fst 
goal: (p.sum q).fst = Sum.inl p.fst

full_name: TwoPointing.sum_snd
code: @[simp]
theorem sum_snd : (p.sum q).snd = Sum.inr q.snd 
goal: (p.sum q).snd = Sum.inr q.snd

full_name: TwoPointing.bool
code: /-- The `false`, `true` two-pointing of `Bool`. -/
protected def bool : TwoPointing Bool 
goal: TwoPointing Bool

full_name: TwoPointing.bool_fst
code: @[simp]
theorem bool_fst : TwoPointing.bool.fst = false 
goal: TwoPointing.bool.fst = false

full_name: TwoPointing.bool_snd
code: @[simp]
theorem bool_snd : TwoPointing.bool.snd = true 
goal: TwoPointing.bool.snd = true

full_name: TwoPointing.instInhabitedBool
code: instance : Inhabited (TwoPointing Bool) 
goal: Inhabited (TwoPointing Bool)

full_name: TwoPointing.prop
code: /-- The `False`, `True` two-pointing of `Prop`. -/
protected def prop : TwoPointing Prop 
goal: TwoPointing Prop

full_name: TwoPointing.prop_fst
code: @[simp]
theorem prop_fst : TwoPointing.prop.fst = False 
goal: TwoPointing.prop.fst = False

full_name: TwoPointing.prop_snd
code: @[simp]
theorem prop_snd : TwoPointing.prop.snd = True 
goal: TwoPointing.prop.snd = True