File: Mathlib/Data/Part.lean

full_name: Part.Dom
code: /-- `Part α` is the type of "partial values" of type `α`. It
  is similar to `Option α` except the domain condition can be an
  arbitrary proposition, not necessarily decidable. -/
structure Part.{u} (α : Type u) : Type u where
  /-- The domain of a partial value -/
  Dom : Prop
  /-- Extract a value from a partial value given a proof of `Dom` -/
  get : Dom → α
goal: Prop

full_name: Part.get
code: /-- `Part α` is the type of "partial values" of type `α`. It
  is similar to `Option α` except the domain condition can be an
  arbitrary proposition, not necessarily decidable. -/
structure Part.{u} (α : Type u) : Type u where
  /-- The domain of a partial value -/
  Dom : Prop
  /-- Extract a value from a partial value given a proof of `Dom` -/
  get : Dom → α
goal: self.Dom → α

full_name: Part.toOption
code: /-- Convert a `Part α` with a decidable domain to an option -/
def toOption (o : Part α) [Decidable o.Dom] : Option α 
goal: Option α

full_name: Part.toOption_isSome
code: @[simp] lemma toOption_isSome (o : Part α) [Decidable o.Dom] : o.toOption.isSome ↔ o.Dom 
goal: o.toOption.isSome = true ↔ o.Dom

full_name: Part.toOption_eq_none
code: @[simp] lemma toOption_eq_none (o : Part α) [Decidable o.Dom] : o.toOption = none ↔ ¬o.Dom 
goal: o.toOption = none ↔ ¬o.Dom

full_name: Part.ext'
code: /-- `Part` extensionality -/
theorem ext' : ∀ {o p : Part α}, (o.Dom ↔ p.Dom) → (∀ h₁ h₂, o.get h₁ = p.get h₂) → o = p
  
goal: (o.Dom ↔ p.Dom) → (∀ (h₁ : o.Dom) (h₂ : p.Dom), o.get h₁ = p.get h₂) → o = p

full_name: Part.eta
code: /-- `Part` eta expansion -/
@[simp]
theorem eta : ∀ o : Part α, (⟨o.Dom, fun h => o.get h⟩ : Part α) = o
  
goal: { Dom := o.Dom, get := fun h => o.get h } = o

full_name: Part.Mem
code: /-- `a ∈ o` means that `o` is defined and equal to `a` -/
protected def Mem (a : α) (o : Part α) : Prop 
goal: Prop

full_name: Part.instMembership
code: instance : Membership α (Part α) 
goal: Membership α (Part α)

full_name: Part.mem_eq
code: theorem mem_eq (a : α) (o : Part α) : (a ∈ o) = ∃ h, o.get h = a 
goal: (a ∈ o) = ∃ (h : o.Dom), o.get h = a

full_name: Part.dom_iff_mem
code: theorem dom_iff_mem : ∀ {o : Part α}, o.Dom ↔ ∃ y, y ∈ o
  
goal: o.Dom ↔ ∃ y, y ∈ o

full_name: Part.get_mem
code: theorem get_mem {o : Part α} (h) : get o h ∈ o 
goal: o.get h ∈ o

full_name: Part.mem_mk_iff
code: @[simp]
theorem mem_mk_iff {p : Prop} {o : p → α} {a : α} : a ∈ Part.mk p o ↔ ∃ h, o h = a 
goal: a ∈ { Dom := p, get := o } ↔ ∃ (h : p), o h = a

full_name: Part.ext
code: /-- `Part` extensionality -/
@[ext]
theorem ext {o p : Part α} (H : ∀ a, a ∈ o ↔ a ∈ p) : o = p 
goal: o = p

full_name: Part.none
code: /-- The `none` value in `Part` has a `False` domain and an empty function. -/
def none : Part α 
goal: Part α

full_name: Part.instInhabited
code: instance : Inhabited (Part α) 
goal: Inhabited (Part α)

full_name: Part.not_mem_none
code: @[simp]
theorem not_mem_none (a : α) : a ∉ @none α 
goal: a ∉ Part.none

full_name: Part.some
code: /-- The `some a` value in `Part` has a `True` domain and the
  function returns `a`. -/
def some (a : α) : Part α 
goal: Part α

full_name: Part.some_dom
code: @[simp]
theorem some_dom (a : α) : (some a).Dom 
goal: (Part.some a).Dom

full_name: Part.mem_unique
code: theorem mem_unique : ∀ {a b : α} {o : Part α}, a ∈ o → b ∈ o → a = b
  
goal: a ∈ o → b ∈ o → a = b

full_name: Part.Mem.left_unique
code: theorem Mem.left_unique : Relator.LeftUnique ((· ∈ ·) : α → Part α → Prop) 
goal: Relator.LeftUnique fun x x_1 => x ∈ x_1

full_name: Part.get_eq_of_mem
code: theorem get_eq_of_mem {o : Part α} {a} (h : a ∈ o) (h') : get o h' = a 
goal: o.get h' = a

full_name: Part.subsingleton
code: protected theorem subsingleton (o : Part α) : Set.Subsingleton { a | a ∈ o } 
goal: {a | a ∈ o}.Subsingleton

full_name: Part.get_some
code: @[simp]
theorem get_some {a : α} (ha : (some a).Dom) : get (some a) ha = a 
goal: (Part.some a).get ha = a

full_name: Part.mem_some
code: theorem mem_some (a : α) : a ∈ some a 
goal: a ∈ Part.some a

full_name: Part.mem_some_iff
code: @[simp]
theorem mem_some_iff {a b} : b ∈ (some a : Part α) ↔ b = a 
goal: b ∈ Part.some a ↔ b = a

full_name: Part.eq_some_iff
code: theorem eq_some_iff {a : α} {o : Part α} : o = some a ↔ a ∈ o 
goal: o = Part.some a ↔ a ∈ o

full_name: Part.eq_none_iff
code: theorem eq_none_iff {o : Part α} : o = none ↔ ∀ a, a ∉ o 
goal: o = Part.none ↔ ∀ (a : α), a ∉ o

full_name: Part.eq_none_iff'
code: theorem eq_none_iff' {o : Part α} : o = none ↔ ¬o.Dom 
goal: o = Part.none ↔ ¬o.Dom

full_name: Part.not_none_dom
code: @[simp]
theorem not_none_dom : ¬(none : Part α).Dom 
goal: ¬Part.none.Dom

full_name: Part.some_ne_none
code: @[simp]
theorem some_ne_none (x : α) : some x ≠ none 
goal: Part.some x ≠ Part.none

full_name: Part.none_ne_some
code: @[simp]
theorem none_ne_some (x : α) : none ≠ some x 
goal: Part.none ≠ Part.some x

full_name: Part.ne_none_iff
code: theorem ne_none_iff {o : Part α} : o ≠ none ↔ ∃ x, o = some x 
goal: o ≠ Part.none ↔ ∃ x, o = Part.some x

full_name: Part.eq_none_or_eq_some
code: theorem eq_none_or_eq_some (o : Part α) : o = none ∨ ∃ x, o = some x 
goal: o = Part.none ∨ ∃ x, o = Part.some x

full_name: Part.some_injective
code: theorem some_injective : Injective (@Part.some α) 
goal: Function.Injective Part.some

full_name: Part.some_inj
code: @[simp]
theorem some_inj {a b : α} : Part.some a = some b ↔ a = b 
goal: Part.some a = Part.some b ↔ a = b

full_name: Part.some_get
code: @[simp]
theorem some_get {a : Part α} (ha : a.Dom) : Part.some (Part.get a ha) = a 
goal: Part.some (a.get ha) = a

full_name: Part.get_eq_iff_eq_some
code: theorem get_eq_iff_eq_some {a : Part α} {ha : a.Dom} {b : α} : a.get ha = b ↔ a = some b 
goal: a.get ha = b ↔ a = Part.some b

full_name: Part.get_eq_get_of_eq
code: theorem get_eq_get_of_eq (a : Part α) (ha : a.Dom) {b : Part α} (h : a = b) :
    a.get ha = b.get (h ▸ ha) 
goal: a.get ha = b.get ⋯

full_name: Part.get_eq_iff_mem
code: theorem get_eq_iff_mem {o : Part α} {a : α} (h : o.Dom) : o.get h = a ↔ a ∈ o 
goal: o.get h = a ↔ a ∈ o

full_name: Part.eq_get_iff_mem
code: theorem eq_get_iff_mem {o : Part α} {a : α} (h : o.Dom) : a = o.get h ↔ a ∈ o 
goal: a = o.get h ↔ a ∈ o

full_name: Part.none_toOption
code: @[simp]
theorem none_toOption [Decidable (@none α).Dom] : (none : Part α).toOption = Option.none 
goal: Part.none.toOption = none

full_name: Part.some_toOption
code: @[simp]
theorem some_toOption (a : α) [Decidable (some a).Dom] : (some a).toOption = Option.some a 
goal: (Part.some a).toOption = some a

full_name: Part.noneDecidable
code: instance noneDecidable : Decidable (@none α).Dom 
goal: Decidable Part.none.Dom

full_name: Part.someDecidable
code: instance someDecidable (a : α) : Decidable (some a).Dom 
goal: Decidable (Part.some a).Dom

full_name: Part.getOrElse
code: /-- Retrieves the value of `a : Part α` if it exists, and return the provided default value
otherwise. -/
def getOrElse (a : Part α) [Decidable a.Dom] (d : α) 
goal: α

full_name: Part.getOrElse_of_dom
code: theorem getOrElse_of_dom (a : Part α) (h : a.Dom) [Decidable a.Dom] (d : α) :
    getOrElse a d = a.get h 
goal: a.getOrElse d = a.get h

full_name: Part.getOrElse_of_not_dom
code: theorem getOrElse_of_not_dom (a : Part α) (h : ¬a.Dom) [Decidable a.Dom] (d : α) :
    getOrElse a d = d 
goal: a.getOrElse d = d

full_name: Part.getOrElse_none
code: @[simp]
theorem getOrElse_none (d : α) [Decidable (none : Part α).Dom] : getOrElse none d = d 
goal: Part.none.getOrElse d = d

full_name: Part.getOrElse_some
code: @[simp]
theorem getOrElse_some (a : α) (d : α) [Decidable (some a).Dom] : getOrElse (some a) d = a 
goal: (Part.some a).getOrElse d = a

full_name: Part.mem_toOption
code: theorem mem_toOption {o : Part α} [Decidable o.Dom] {a : α} : a ∈ toOption o ↔ a ∈ o 
goal: a ∈ o.toOption ↔ a ∈ o

full_name: Part.toOption_eq_some_iff
code: @[simp]
theorem toOption_eq_some_iff {o : Part α} [Decidable o.Dom] {a : α} :
    toOption o = Option.some a ↔ a ∈ o 
goal: o.toOption = some a ↔ a ∈ o

full_name: Part.Dom.toOption
code: protected theorem Dom.toOption {o : Part α} [Decidable o.Dom] (h : o.Dom) : o.toOption = o.get h 
goal: o.toOption = some (o.get h)

full_name: Part.toOption_eq_none_iff
code: theorem toOption_eq_none_iff {a : Part α} [Decidable a.Dom] : a.toOption = Option.none ↔ ¬a.Dom 
goal: a.toOption = none ↔ ¬a.Dom

full_name: Part.elim_toOption
code: theorem elim_toOption {α β : Type*} (a : Part α) [Decidable a.Dom] (b : β) (f : α → β) :
    a.toOption.elim b f = if h : a.Dom then f (a.get h) else b 
goal: a.toOption.elim b f = if h : a.Dom then f (a.get h) else b

full_name: Part.ofOption
code: /-- Converts an `Option α` into a `Part α`. -/
@[coe]
def ofOption : Option α → Part α
  
goal: Option α → Part α

full_name: Part.mem_ofOption
code: @[simp]
theorem mem_ofOption {a : α} : ∀ {o : Option α}, a ∈ ofOption o ↔ a ∈ o
  
goal: a ∈ ↑o ↔ a ∈ o

full_name: Part.ofOption_dom
code: @[simp]
theorem ofOption_dom {α} : ∀ o : Option α, (ofOption o).Dom ↔ o.isSome
  
goal: (↑o).Dom ↔ o.isSome = true

full_name: Part.ofOption_eq_get
code: theorem ofOption_eq_get {α} (o : Option α) : ofOption o = ⟨_, @Option.get _ o⟩ 
goal: ↑o = { Dom := o.isSome = true, get := o.get }

full_name: Part.instCoeOption
code: instance : Coe (Option α) (Part α) 
goal: Coe (Option α) (Part α)

full_name: Part.mem_coe
code: theorem mem_coe {a : α} {o : Option α} : a ∈ (o : Part α) ↔ a ∈ o 
goal: a ∈ ↑o ↔ a ∈ o

full_name: Part.coe_none
code: @[simp]
theorem coe_none : (@Option.none α : Part α) = none 
goal: ↑none = Part.none

full_name: Part.coe_some
code: @[simp]
theorem coe_some (a : α) : (Option.some a : Part α) = some a 
goal: ↑(some a) = Part.some a

full_name: Part.induction_on
code: @[elab_as_elim]
protected theorem induction_on {P : Part α → Prop} (a : Part α) (hnone : P none)
    (hsome : ∀ a : α, P (some a)) : P a 
goal: P a

full_name: Part.ofOptionDecidable
code: instance ofOptionDecidable : ∀ o : Option α, Decidable (ofOption o).Dom
  
goal: Decidable (↑o).Dom

full_name: Part.to_ofOption
code: @[simp]
theorem to_ofOption (o : Option α) : toOption (ofOption o) = o 
goal: (↑o).toOption = o

full_name: Part.of_toOption
code: @[simp]
theorem of_toOption (o : Part α) [Decidable o.Dom] : ofOption (toOption o) = o 
goal: ↑o.toOption = o

full_name: Part.equivOption
code: /-- `Part α` is (classically) equivalent to `Option α`. -/
noncomputable def equivOption : Part α ≃ Option α 
goal: Part α ≃ Option α

full_name: Part.instPartialOrder
code: /-- We give `Part α` the order where everything is greater than `none`. -/
instance : PartialOrder (Part
        α) 
goal: PartialOrder (Part α)

full_name: Part.instOrderBot
code: instance : OrderBot (Part α) 
goal: OrderBot (Part α)

full_name: Part.le_total_of_le_of_le
code: theorem le_total_of_le_of_le {x y : Part α} (z : Part α) (hx : x ≤ z) (hy : y ≤ z) :
    x ≤ y ∨ y ≤ x 
goal: x ≤ y ∨ y ≤ x

full_name: Part.assert
code: /-- `assert p f` is a bind-like operation which appends an additional condition
  `p` to the domain and uses `f` to produce the value. -/
def assert (p : Prop) (f : p → Part α) : Part α 
goal: Part α

full_name: Part.bind
code: /-- The bind operation has value `g (f.get)`, and is defined when all the
  parts are defined. -/
protected def bind (f : Part α) (g : α → Part β) : Part β 
goal: Part β

full_name: Part.map_get
code: /-- The map operation for `Part` just maps the value and maintains the same domain. -/
@[simps]
def map (f : α → β) (o : Part α) : Part β 
goal: ∀ (a : o.Dom), (Part.map f o).get a = (f ∘ o.get) a

full_name: Part.map_Dom
code: /-- The map operation for `Part` just maps the value and maintains the same domain. -/
@[simps]
def map (f : α → β) (o : Part α) : Part β 
goal: (Part.map f o).Dom = o.Dom

full_name: Part.map
code: /-- The map operation for `Part` just maps the value and maintains the same domain. -/
@[simps]
def map (f : α → β) (o : Part α) : Part β 
goal: Part β

full_name: Part.mem_map
code: theorem mem_map (f : α → β) {o : Part α} : ∀ {a}, a ∈ o → f a ∈ map f o
  
goal: a ∈ o → f a ∈ Part.map f o

full_name: Part.mem_map_iff
code: @[simp]
theorem mem_map_iff (f : α → β) {o : Part α} {b} : b ∈ map f o ↔ ∃ a ∈ o, f a = b 
goal: b ∈ Part.map f o ↔ ∃ a ∈ o, f a = b

full_name: Part.map_none
code: @[simp]
theorem map_none (f : α → β) : map f none = none 
goal: Part.map f Part.none = Part.none

full_name: Part.map_some
code: @[simp]
theorem map_some (f : α → β) (a : α) : map f (some a) = some (f a) 
goal: Part.map f (Part.some a) = Part.some (f a)

full_name: Part.mem_assert
code: theorem mem_assert {p : Prop} {f : p → Part α} : ∀ {a} (h : p), a ∈ f h → a ∈ assert p f
  
goal: a ∈ f h → a ∈ Part.assert p f

full_name: Part.mem_assert_iff
code: @[simp]
theorem mem_assert_iff {p : Prop} {f : p → Part α} {a} : a ∈ assert p f ↔ ∃ h : p, a ∈ f h 
goal: a ∈ Part.assert p f ↔ ∃ (h : p), a ∈ f h

full_name: Part.assert_pos
code: theorem assert_pos {p : Prop} {f : p → Part α} (h : p) : assert p f = f h 
goal: Part.assert p f = f h

full_name: Part.assert_neg
code: theorem assert_neg {p : Prop} {f : p → Part α} (h : ¬p) : assert p f = none 
goal: Part.assert p f = Part.none

full_name: Part.mem_bind
code: theorem mem_bind {f : Part α} {g : α → Part β} : ∀ {a b}, a ∈ f → b ∈ g a → b ∈ f.bind g
  
goal: a ∈ f → b ∈ g a → b ∈ f.bind g

full_name: Part.mem_bind_iff
code: @[simp]
theorem mem_bind_iff {f : Part α} {g : α → Part β} {b} : b ∈ f.bind g ↔ ∃ a ∈ f, b ∈ g a 
goal: b ∈ f.bind g ↔ ∃ a ∈ f, b ∈ g a

full_name: Part.Dom.bind
code: protected theorem Dom.bind {o : Part α} (h : o.Dom) (f : α → Part β) : o.bind f = f (o.get h) 
goal: o.bind f = f (o.get h)

full_name: Part.Dom.of_bind
code: theorem Dom.of_bind {f : α → Part β} {a : Part α} (h : (a.bind f).Dom) : a.Dom 
goal: a.Dom

full_name: Part.bind_none
code: @[simp]
theorem bind_none (f : α → Part β) : none.bind f = none 
goal: Part.none.bind f = Part.none

full_name: Part.bind_some
code: @[simp]
theorem bind_some (a : α) (f : α → Part β) : (some a).bind f = f a 
goal: (Part.some a).bind f = f a

full_name: Part.bind_of_mem
code: theorem bind_of_mem {o : Part α} {a : α} (h : a ∈ o) (f : α → Part β) : o.bind f = f a 
goal: o.bind f = f a

full_name: Part.bind_some_eq_map
code: theorem bind_some_eq_map (f : α → β) (x : Part α) : x.bind (some ∘ f) = map f x 
goal: x.bind (Part.some ∘ f) = Part.map f x

full_name: Part.bind_toOption
code: theorem bind_toOption (f : α → Part β) (o : Part α) [Decidable o.Dom] [∀ a, Decidable (f a).Dom]
    [Decidable (o.bind f).Dom] :
    (o.bind f).toOption = o.toOption.elim Option.none fun a => (f a).toOption 
goal: (o.bind f).toOption = o.toOption.elim none fun a => (f a).toOption

full_name: Part.bind_assoc
code: theorem bind_assoc {γ} (f : Part α) (g : α → Part β) (k : β → Part γ) :
    (f.bind g).bind k = f.bind fun x => (g x).bind k 
goal: (f.bind g).bind k = f.bind fun x => (g x).bind k

full_name: Part.bind_map
code: @[simp]
theorem bind_map {γ} (f : α → β) (x) (g : β → Part γ) :
    (map f x).bind g = x.bind fun y => g (f y) 
goal: (Part.map f x).bind g = x.bind fun y => g (f y)

full_name: Part.map_bind
code: @[simp]
theorem map_bind {γ} (f : α → Part β) (x : Part α) (g : β → γ) :
    map g (x.bind f) = x.bind fun y => map g (f y) 
goal: Part.map g (x.bind f) = x.bind fun y => Part.map g (f y)

full_name: Part.map_map
code: theorem map_map (g : β → γ) (f : α → β) (o : Part α) : map g (map f o) = map (g ∘ f) o 
goal: Part.map g (Part.map f o) = Part.map (g ∘ f) o

full_name: Part.instMonad
code: instance : Monad Part 
goal: Monad Part

full_name: Part.instLawfulMonad
code: instance : LawfulMonad
      Part 
goal: LawfulMonad Part

full_name: Part.map_id'
code: theorem map_id' {f : α → α} (H : ∀ x : α, f x = x) (o) : map f o = o 
goal: Part.map f o = o

full_name: Part.bind_some_right
code: @[simp]
theorem bind_some_right (x : Part α) : x.bind some = x 
goal: x.bind Part.some = x

full_name: Part.pure_eq_some
code: @[simp]
theorem pure_eq_some (a : α) : pure a = some a 
goal: pure a = Part.some a

full_name: Part.ret_eq_some
code: @[simp]
theorem ret_eq_some (a : α) : (return a : Part α) = some a 
goal: pure a = Part.some a

full_name: Part.map_eq_map
code: @[simp]
theorem map_eq_map {α β} (f : α → β) (o : Part α) : f <$> o = map f o 
goal: f <$> o = Part.map f o

full_name: Part.bind_eq_bind
code: @[simp]
theorem bind_eq_bind {α β} (f : Part α) (g : α → Part β) : f >>= g = f.bind g 
goal: f >>= g = f.bind g

full_name: Part.bind_le
code: theorem bind_le {α} (x : Part α) (f : α → Part β) (y : Part β) :
    x >>= f ≤ y ↔ ∀ a, a ∈ x → f a ≤ y 
goal: x >>= f ≤ y ↔ ∀ a ∈ x, f a ≤ y

full_name: Part.restrict
code: /-- `restrict p o h` replaces the domain of `o` with `p`, and is well defined when
  `p` implies `o` is defined. -/
def restrict (p : Prop) (o : Part α) (H : p → o.Dom) : Part α 
goal: Part α

full_name: Part.mem_restrict
code: @[simp]
theorem mem_restrict (p : Prop) (o : Part α) (h : p → o.Dom) (a : α) :
    a ∈ restrict p o h ↔ p ∧ a ∈ o 
goal: a ∈ Part.restrict p o h ↔ p ∧ a ∈ o

full_name: Part.unwrap
code: /-- `unwrap o` gets the value at `o`, ignoring the condition. This function is unsound. -/
unsafe def unwrap (o : Part α) : α 
goal: α

full_name: Part.assert_defined
code: theorem assert_defined {p : Prop} {f : p → Part α} : ∀ h : p, (f h).Dom → (assert p f).Dom 
goal: (f h).Dom → (Part.assert p f).Dom

full_name: Part.bind_defined
code: theorem bind_defined {f : Part α} {g : α → Part β} :
    ∀ h : f.Dom, (g (f.get h)).Dom → (f.bind g).Dom 
goal: (g (f.get h)).Dom → (f.bind g).Dom

full_name: Part.bind_dom
code: @[simp]
theorem bind_dom {f : Part α} {g : α → Part β} : (f.bind g).Dom ↔ ∃ h : f.Dom, (g (f.get h)).Dom 
goal: (f.bind g).Dom ↔ ∃ (h : f.Dom), (g (f.get h)).Dom

full_name: Part.instOne
code: @[to_additive]
instance [One α] : One (Part α) 
goal: One (Part α)

full_name: Part.instZero
code: @[to_additive]
instance [One α] : One (Part α) 
goal: Zero (Part α)

full_name: Part.instMul
code: @[to_additive]
instance [Mul α] : Mul (Part α) 
goal: Mul (Part α)

full_name: Part.instAdd
code: @[to_additive]
instance [Mul α] : Mul (Part α) 
goal: Add (Part α)

full_name: Part.instInv
code: @[to_additive]
instance [Inv α] : Inv (Part α) 
goal: Inv (Part α)

full_name: Part.instNeg
code: @[to_additive]
instance [Inv α] : Inv (Part α) 
goal: Neg (Part α)

full_name: Part.instSub
code: @[to_additive]
instance [Div α] : Div (Part α) 
goal: Sub (Part α)

full_name: Part.instDiv
code: @[to_additive]
instance [Div α] : Div (Part α) 
goal: Div (Part α)

full_name: Part.instMod
code: instance [Mod α] : Mod (Part α) 
goal: Mod (Part α)

full_name: Part.instAppend
code: instance [Append α] : Append (Part α) 
goal: Append (Part α)

full_name: Part.instInter
code: instance [Inter α] : Inter (Part α) 
goal: Inter (Part α)

full_name: Part.instUnion
code: instance [Union α] : Union (Part α) 
goal: Union (Part α)

full_name: Part.instSDiff
code: instance [SDiff α] : SDiff (Part α) 
goal: SDiff (Part α)

full_name: Part.mul_def
code: theorem mul_def [Mul α] (a b : Part α) : a * b = bind a fun y ↦ map (y * ·) b 
goal: a * b = do
  let y ← a
  Part.map (fun x => y * x) b

full_name: Part.one_def
code: theorem one_def [One α] : (1 : Part α) = some 1 
goal: 1 = Part.some 1

full_name: Part.inv_def
code: theorem inv_def [Inv α] (a : Part α) : a⁻¹ = Part.map (· ⁻¹) a 
goal: a⁻¹ = Part.map (fun x => x⁻¹) a

full_name: Part.div_def
code: theorem div_def [Div α] (a b : Part α) : a / b = bind a fun y => map (y / ·) b 
goal: a / b = do
  let y ← a
  Part.map (fun x => y / x) b

full_name: Part.mod_def
code: theorem mod_def [Mod α] (a b : Part α) : a % b = bind a fun y => map (y % ·) b 
goal: a % b = do
  let y ← a
  Part.map (fun x => y % x) b

full_name: Part.append_def
code: theorem append_def [Append α] (a b : Part α) : a ++ b = bind a fun y => map (y ++ ·) b 
goal: a ++ b = do
  let y ← a
  Part.map (fun x => y ++ x) b

full_name: Part.inter_def
code: theorem inter_def [Inter α] (a b : Part α) : a ∩ b = bind a fun y => map (y ∩ ·) b 
goal: a ∩ b = do
  let y ← a
  Part.map (fun x => y ∩ x) b

full_name: Part.union_def
code: theorem union_def [Union α] (a b : Part α) : a ∪ b = bind a fun y => map (y ∪ ·) b 
goal: a ∪ b = do
  let y ← a
  Part.map (fun x => y ∪ x) b

full_name: Part.sdiff_def
code: theorem sdiff_def [SDiff α] (a b : Part α) : a \ b = bind a fun y => map (y \ ·) b 
goal: a \ b = do
  let y ← a
  Part.map (fun x => y \ x) b

full_name: Part.one_mem_one
code: @[to_additive]
theorem one_mem_one [One α] : (1 : α) ∈ (1 : Part α) 
goal: 1 ∈ 1

full_name: Part.zero_mem_zero
code: @[to_additive]
theorem one_mem_one [One α] : (1 : α) ∈ (1 : Part α) 
goal: 0 ∈ 0

full_name: Part.add_mem_add
code: @[to_additive]
theorem mul_mem_mul [Mul α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma * mb ∈ a * b 
goal: ma + mb ∈ a + b

full_name: Part.mul_mem_mul
code: @[to_additive]
theorem mul_mem_mul [Mul α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma * mb ∈ a * b 
goal: ma * mb ∈ a * b

full_name: Part.left_dom_of_add_dom
code: @[to_additive]
theorem left_dom_of_mul_dom [Mul α] {a b : Part α} (hab : Dom (a * b)) : a.Dom 
goal: a.Dom

full_name: Part.left_dom_of_mul_dom
code: @[to_additive]
theorem left_dom_of_mul_dom [Mul α] {a b : Part α} (hab : Dom (a * b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_mul_dom
code: @[to_additive]
theorem right_dom_of_mul_dom [Mul α] {a b : Part α} (hab : Dom (a * b)) : b.Dom 
goal: b.Dom

full_name: Part.right_dom_of_add_dom
code: @[to_additive]
theorem right_dom_of_mul_dom [Mul α] {a b : Part α} (hab : Dom (a * b)) : b.Dom 
goal: b.Dom

full_name: Part.add_get_eq
code: @[to_additive (attr := simp)]
theorem mul_get_eq [Mul α] (a b : Part α) (hab : Dom (a * b)) :
    (a * b).get hab = a.get (left_dom_of_mul_dom hab) * b.get (right_dom_of_mul_dom hab) 
goal: (a + b).get hab = a.get ⋯ + b.get ⋯

full_name: Part.mul_get_eq
code: @[to_additive (attr := simp)]
theorem mul_get_eq [Mul α] (a b : Part α) (hab : Dom (a * b)) :
    (a * b).get hab = a.get (left_dom_of_mul_dom hab) * b.get (right_dom_of_mul_dom hab) 
goal: (a * b).get hab = a.get ⋯ * b.get ⋯

full_name: Part.some_add_some
code: @[to_additive]
theorem some_mul_some [Mul α] (a b : α) : some a * some b = some (a * b) 
goal: Part.some a + Part.some b = Part.some (a + b)

full_name: Part.some_mul_some
code: @[to_additive]
theorem some_mul_some [Mul α] (a b : α) : some a * some b = some (a * b) 
goal: Part.some a * Part.some b = Part.some (a * b)

full_name: Part.neg_mem_neg
code: @[to_additive]
theorem inv_mem_inv [Inv α] (a : Part α) (ma : α) (ha : ma ∈ a) : ma⁻¹ ∈ a⁻¹ 
goal: -ma ∈ -a

full_name: Part.inv_mem_inv
code: @[to_additive]
theorem inv_mem_inv [Inv α] (a : Part α) (ma : α) (ha : ma ∈ a) : ma⁻¹ ∈ a⁻¹ 
goal: ma⁻¹ ∈ a⁻¹

full_name: Part.neg_some
code: @[to_additive]
theorem inv_some [Inv α] (a : α) : (some a)⁻¹ = some a⁻¹ 
goal: -Part.some a = Part.some (-a)

full_name: Part.inv_some
code: @[to_additive]
theorem inv_some [Inv α] (a : α) : (some a)⁻¹ = some a⁻¹ 
goal: (Part.some a)⁻¹ = Part.some a⁻¹

full_name: Part.div_mem_div
code: @[to_additive]
theorem div_mem_div [Div α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma / mb ∈ a / b 
goal: ma / mb ∈ a / b

full_name: Part.sub_mem_sub
code: @[to_additive]
theorem div_mem_div [Div α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma / mb ∈ a / b 
goal: ma - mb ∈ a - b

full_name: Part.left_dom_of_sub_dom
code: @[to_additive]
theorem left_dom_of_div_dom [Div α] {a b : Part α} (hab : Dom (a / b)) : a.Dom 
goal: a.Dom

full_name: Part.left_dom_of_div_dom
code: @[to_additive]
theorem left_dom_of_div_dom [Div α] {a b : Part α} (hab : Dom (a / b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_div_dom
code: @[to_additive]
theorem right_dom_of_div_dom [Div α] {a b : Part α} (hab : Dom (a / b)) : b.Dom 
goal: b.Dom

full_name: Part.right_dom_of_sub_dom
code: @[to_additive]
theorem right_dom_of_div_dom [Div α] {a b : Part α} (hab : Dom (a / b)) : b.Dom 
goal: b.Dom

full_name: Part.div_get_eq
code: @[to_additive (attr := simp)]
theorem div_get_eq [Div α] (a b : Part α) (hab : Dom (a / b)) :
    (a / b).get hab = a.get (left_dom_of_div_dom hab) / b.get (right_dom_of_div_dom hab) 
goal: (a / b).get hab = a.get ⋯ / b.get ⋯

full_name: Part.sub_get_eq
code: @[to_additive (attr := simp)]
theorem div_get_eq [Div α] (a b : Part α) (hab : Dom (a / b)) :
    (a / b).get hab = a.get (left_dom_of_div_dom hab) / b.get (right_dom_of_div_dom hab) 
goal: (a - b).get hab = a.get ⋯ - b.get ⋯

full_name: Part.some_sub_some
code: @[to_additive]
theorem some_div_some [Div α] (a b : α) : some a / some b = some (a / b) 
goal: Part.some a - Part.some b = Part.some (a - b)

full_name: Part.some_div_some
code: @[to_additive]
theorem some_div_some [Div α] (a b : α) : some a / some b = some (a / b) 
goal: Part.some a / Part.some b = Part.some (a / b)

full_name: Part.mod_mem_mod
code: theorem mod_mem_mod [Mod α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma % mb ∈ a % b 
goal: ma % mb ∈ a % b

full_name: Part.left_dom_of_mod_dom
code: theorem left_dom_of_mod_dom [Mod α] {a b : Part α} (hab : Dom (a % b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_mod_dom
code: theorem right_dom_of_mod_dom [Mod α] {a b : Part α} (hab : Dom (a % b)) : b.Dom 
goal: b.Dom

full_name: Part.mod_get_eq
code: @[simp]
theorem mod_get_eq [Mod α] (a b : Part α) (hab : Dom (a % b)) :
    (a % b).get hab = a.get (left_dom_of_mod_dom hab) % b.get (right_dom_of_mod_dom hab) 
goal: (a % b).get hab = a.get ⋯ % b.get ⋯

full_name: Part.some_mod_some
code: theorem some_mod_some [Mod α] (a b : α) : some a % some b = some (a % b) 
goal: Part.some a % Part.some b = Part.some (a % b)

full_name: Part.append_mem_append
code: theorem append_mem_append [Append α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma ++ mb ∈ a ++ b 
goal: ma ++ mb ∈ a ++ b

full_name: Part.left_dom_of_append_dom
code: theorem left_dom_of_append_dom [Append α] {a b : Part α} (hab : Dom (a ++ b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_append_dom
code: theorem right_dom_of_append_dom [Append α] {a b : Part α} (hab : Dom (a ++ b)) : b.Dom 
goal: b.Dom

full_name: Part.append_get_eq
code: @[simp]
theorem append_get_eq [Append α] (a b : Part α) (hab : Dom (a ++ b)) : (a ++ b).get hab =
    a.get (left_dom_of_append_dom hab) ++ b.get (right_dom_of_append_dom hab) 
goal: (a ++ b).get hab = a.get ⋯ ++ b.get ⋯

full_name: Part.some_append_some
code: theorem some_append_some [Append α] (a b : α) : some a ++ some b = some (a ++ b) 
goal: Part.some a ++ Part.some b = Part.some (a ++ b)

full_name: Part.inter_mem_inter
code: theorem inter_mem_inter [Inter α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma ∩ mb ∈ a ∩ b 
goal: ma ∩ mb ∈ a ∩ b

full_name: Part.left_dom_of_inter_dom
code: theorem left_dom_of_inter_dom [Inter α] {a b : Part α} (hab : Dom (a ∩ b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_inter_dom
code: theorem right_dom_of_inter_dom [Inter α] {a b : Part α} (hab : Dom (a ∩ b)) : b.Dom 
goal: b.Dom

full_name: Part.inter_get_eq
code: @[simp]
theorem inter_get_eq [Inter α] (a b : Part α) (hab : Dom (a ∩ b)) :
    (a ∩ b).get hab = a.get (left_dom_of_inter_dom hab) ∩ b.get (right_dom_of_inter_dom hab) 
goal: (a ∩ b).get hab = a.get ⋯ ∩ b.get ⋯

full_name: Part.some_inter_some
code: theorem some_inter_some [Inter α] (a b : α) : some a ∩ some b = some (a ∩ b) 
goal: Part.some a ∩ Part.some b = Part.some (a ∩ b)

full_name: Part.union_mem_union
code: theorem union_mem_union [Union α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma ∪ mb ∈ a ∪ b 
goal: ma ∪ mb ∈ a ∪ b

full_name: Part.left_dom_of_union_dom
code: theorem left_dom_of_union_dom [Union α] {a b : Part α} (hab : Dom (a ∪ b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_union_dom
code: theorem right_dom_of_union_dom [Union α] {a b : Part α} (hab : Dom (a ∪ b)) : b.Dom 
goal: b.Dom

full_name: Part.union_get_eq
code: @[simp]
theorem union_get_eq [Union α] (a b : Part α) (hab : Dom (a ∪ b)) :
    (a ∪ b).get hab = a.get (left_dom_of_union_dom hab) ∪ b.get (right_dom_of_union_dom hab) 
goal: (a ∪ b).get hab = a.get ⋯ ∪ b.get ⋯

full_name: Part.some_union_some
code: theorem some_union_some [Union α] (a b : α) : some a ∪ some b = some (a ∪ b) 
goal: Part.some a ∪ Part.some b = Part.some (a ∪ b)

full_name: Part.sdiff_mem_sdiff
code: theorem sdiff_mem_sdiff [SDiff α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma \ mb ∈ a \ b 
goal: ma \ mb ∈ a \ b

full_name: Part.left_dom_of_sdiff_dom
code: theorem left_dom_of_sdiff_dom [SDiff α] {a b : Part α} (hab : Dom (a \ b)) : a.Dom 
goal: a.Dom

full_name: Part.right_dom_of_sdiff_dom
code: theorem right_dom_of_sdiff_dom [SDiff α] {a b : Part α} (hab : Dom (a \ b)) : b.Dom 
goal: b.Dom

full_name: Part.sdiff_get_eq
code: @[simp]
theorem sdiff_get_eq [SDiff α] (a b : Part α) (hab : Dom (a \ b)) :
    (a \ b).get hab = a.get (left_dom_of_sdiff_dom hab) \ b.get (right_dom_of_sdiff_dom hab) 
goal: (a \ b).get hab = a.get ⋯ \ b.get ⋯

full_name: Part.some_sdiff_some
code: theorem some_sdiff_some [SDiff α] (a b : α) : some a \ some b = some (a \ b) 
goal: Part.some a \ Part.some b = Part.some (a \ b)