File: Mathlib/NumberTheory/Dioph.lean

full_name: «_aux_Mathlib_NumberTheory_Dioph___macroRules_term_::ₒ__1»
code: local infixr:67 " ::ₒ " => Option.elim'
goal: Lean.Macro

full_name: _aux_Mathlib_NumberTheory_Dioph___unexpand_Option_elim'_1
code: local infixr:67 " ::ₒ " => Option.elim'
goal: Lean.PrettyPrinter.Unexpander

full_name: _aux_Mathlib_NumberTheory_Dioph___unexpand_Sum_elim_1
code: local infixr:65 " ⊗ " => Sum.elim
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_NumberTheory_Dioph___macroRules_term_⊗__1»
code: local infixr:65 " ⊗ " => Sum.elim
goal: Lean.Macro

full_name: IsPoly.const
code: /-- A predicate asserting that a function is a multivariate integer polynomial.
  (We are being a bit lazy here by allowing many representations for multiplication,
  rather than only allowing monomials and addition, but the definition is equivalent
  and this is easier to use.) -/
inductive IsPoly : ((α → ℕ) → ℤ) → Prop
  | proj : ∀ i, IsPoly fun x : α → ℕ => x i
  | const : ∀ n : ℤ, IsPoly fun _ : α → ℕ => n
  | sub : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x - g x
  | mul : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x * g x
goal: IsPoly fun x => n

full_name: IsPoly.mul
code: /-- A predicate asserting that a function is a multivariate integer polynomial.
  (We are being a bit lazy here by allowing many representations for multiplication,
  rather than only allowing monomials and addition, but the definition is equivalent
  and this is easier to use.) -/
inductive IsPoly : ((α → ℕ) → ℤ) → Prop
  | proj : ∀ i, IsPoly fun x : α → ℕ => x i
  | const : ∀ n : ℤ, IsPoly fun _ : α → ℕ => n
  | sub : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x - g x
  | mul : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x * g x
goal: IsPoly f → IsPoly g → IsPoly fun x => f x * g x

full_name: IsPoly
code: /-- A predicate asserting that a function is a multivariate integer polynomial.
  (We are being a bit lazy here by allowing many representations for multiplication,
  rather than only allowing monomials and addition, but the definition is equivalent
  and this is easier to use.) -/
inductive IsPoly : ((α → ℕ) → ℤ) → Prop
  | proj : ∀ i, IsPoly fun x : α → ℕ => x i
  | const : ∀ n : ℤ, IsPoly fun _ : α → ℕ => n
  | sub : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x - g x
  | mul : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x * g x
goal: ((α → ℕ) → ℤ) → Prop

full_name: IsPoly.proj
code: /-- A predicate asserting that a function is a multivariate integer polynomial.
  (We are being a bit lazy here by allowing many representations for multiplication,
  rather than only allowing monomials and addition, but the definition is equivalent
  and this is easier to use.) -/
inductive IsPoly : ((α → ℕ) → ℤ) → Prop
  | proj : ∀ i, IsPoly fun x : α → ℕ => x i
  | const : ∀ n : ℤ, IsPoly fun _ : α → ℕ => n
  | sub : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x - g x
  | mul : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x * g x
goal: IsPoly fun x => ↑(x i)

full_name: IsPoly.sub
code: /-- A predicate asserting that a function is a multivariate integer polynomial.
  (We are being a bit lazy here by allowing many representations for multiplication,
  rather than only allowing monomials and addition, but the definition is equivalent
  and this is easier to use.) -/
inductive IsPoly : ((α → ℕ) → ℤ) → Prop
  | proj : ∀ i, IsPoly fun x : α → ℕ => x i
  | const : ∀ n : ℤ, IsPoly fun _ : α → ℕ => n
  | sub : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x - g x
  | mul : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x * g x
goal: IsPoly f → IsPoly g → IsPoly fun x => f x - g x

full_name: IsPoly.neg
code: theorem IsPoly.neg {f : (α → ℕ) → ℤ} : IsPoly f → IsPoly (-f) 
goal: IsPoly f → IsPoly (-f)

full_name: IsPoly.add
code: theorem IsPoly.add {f g : (α → ℕ) → ℤ} (hf : IsPoly f) (hg : IsPoly g) : IsPoly (f + g) 
goal: IsPoly (f + g)

full_name: Poly
code: /-- The type of multivariate integer polynomials -/
def Poly (α : Type u) 
goal: Type u

full_name: Poly.instFunLike
code: instance instFunLike : FunLike (Poly α) (α → ℕ) ℤ 
goal: FunLike (Poly α) (α → ℕ) ℤ

full_name: Poly.isPoly
code: /-- The underlying function of a `Poly` is a polynomial -/
protected theorem isPoly (f : Poly α) : IsPoly f 
goal: IsPoly ⇑f

full_name: Poly.ext
code: /-- Extensionality for `Poly α` -/
@[ext]
theorem ext {f g : Poly α} : (∀ x, f x = g x) → f = g 
goal: (∀ (x : α → ℕ), f x = g x) → f = g

full_name: Poly.proj
code: /-- The `i`th projection function, `x_i`. -/
def proj (i : α) : Poly α 
goal: Poly α

full_name: Poly.proj_apply
code: @[simp]
theorem proj_apply (i : α) (x) : proj i x = x i 
goal: (Poly.proj i) x = ↑(x i)

full_name: Poly.const
code: /-- The constant function with value `n : ℤ`. -/
def const (n : ℤ) : Poly α 
goal: Poly α

full_name: Poly.const_apply
code: @[simp]
theorem const_apply (n) (x : α → ℕ) : const n x = n 
goal: (Poly.const n) x = n

full_name: Poly.instZero
code: instance : Zero (Poly α) 
goal: Zero (Poly α)

full_name: Poly.instOne
code: instance : One (Poly α) 
goal: One (Poly α)

full_name: Poly.instNeg
code: instance : Neg (Poly α) 
goal: Neg (Poly α)

full_name: Poly.instAdd
code: instance : Add (Poly α) 
goal: Add (Poly α)

full_name: Poly.instSub
code: instance : Sub (Poly α) 
goal: Sub (Poly α)

full_name: Poly.instMul
code: instance : Mul (Poly α) 
goal: Mul (Poly α)

full_name: Poly.coe_zero
code: @[simp]
theorem coe_zero : ⇑(0 : Poly α) = const 0 
goal: ⇑0 = ⇑(Poly.const 0)

full_name: Poly.coe_one
code: @[simp]
theorem coe_one : ⇑(1 : Poly α) = const 1 
goal: ⇑1 = ⇑(Poly.const 1)

full_name: Poly.coe_neg
code: @[simp]
theorem coe_neg (f : Poly α) : ⇑(-f) = -f 
goal: ⇑(-f) = -⇑f

full_name: Poly.coe_add
code: @[simp]
theorem coe_add (f g : Poly α) : ⇑(f + g) = f + g 
goal: ⇑(f + g) = ⇑f + ⇑g

full_name: Poly.coe_sub
code: @[simp]
theorem coe_sub (f g : Poly α) : ⇑(f - g) = f - g 
goal: ⇑(f - g) = ⇑f - ⇑g

full_name: Poly.coe_mul
code: @[simp]
theorem coe_mul (f g : Poly α) : ⇑(f * g) = f * g 
goal: ⇑(f * g) = ⇑f * ⇑g

full_name: Poly.zero_apply
code: @[simp]
theorem zero_apply (x) : (0 : Poly α) x = 0 
goal: 0 x = 0

full_name: Poly.one_apply
code: @[simp]
theorem one_apply (x) : (1 : Poly α) x = 1 
goal: 1 x = 1

full_name: Poly.neg_apply
code: @[simp]
theorem neg_apply (f : Poly α) (x) : (-f) x = -f x 
goal: (-f) x = -f x

full_name: Poly.add_apply
code: @[simp]
theorem add_apply (f g : Poly α) (x : α → ℕ) : (f + g) x = f x + g x 
goal: (f + g) x = f x + g x

full_name: Poly.sub_apply
code: @[simp]
theorem sub_apply (f g : Poly α) (x : α → ℕ) : (f - g) x = f x - g x 
goal: (f - g) x = f x - g x

full_name: Poly.mul_apply
code: @[simp]
theorem mul_apply (f g : Poly α) (x : α → ℕ) : (f * g) x = f x * g x 
goal: (f * g) x = f x * g x

full_name: Poly.instInhabited
code: instance (α : Type*) : Inhabited (Poly α) 
goal: Inhabited (Poly α)

full_name: Poly.instAddCommGroup
code: instance : AddCommGroup (Poly α) 
goal: AddCommGroup (Poly α)

full_name: Poly.instAddGroupWithOne
code: instance : AddGroupWithOne (Poly α) 
goal: AddGroupWithOne (Poly α)

full_name: Poly.instCommRing
code: instance : CommRing (Poly α) 
goal: CommRing (Poly α)

full_name: Poly.induction
code: theorem induction {C : Poly α → Prop} (H1 : ∀ i, C (proj i)) (H2 : ∀ n, C (const n))
    (H3 : ∀ f g, C f → C g → C (f - g)) (H4 : ∀ f g, C f → C g → C (f * g)) (f : Poly α) : C f 
goal: C f

full_name: Poly.sumsq
code: /-- The sum of squares of a list of polynomials. This is relevant for
  Diophantine equations, because it means that a list of equations
  can be encoded as a single equation: `x = 0 ∧ y = 0 ∧ z = 0` is
  equivalent to `x^2 + y^2 + z^2 = 0`. -/
def sumsq : List (Poly α) → Poly α
  
goal: List (Poly α) → Poly α

full_name: Poly.sumsq_nonneg
code: theorem sumsq_nonneg (x : α → ℕ) : ∀ l, 0 ≤ sumsq l x
  
goal: 0 ≤ (Poly.sumsq l) x

full_name: Poly.sumsq_eq_zero
code: theorem sumsq_eq_zero (x) : ∀ l, sumsq l x = 0 ↔ l.Forall fun a : Poly α => a x = 0
  
goal: (Poly.sumsq l) x = 0 ↔ List.Forall (fun a => a x = 0) l

full_name: Poly.map
code: /-- Map the index set of variables, replacing `x_i` with `x_(f i)`. -/
def map {α β} (f : α → β) (g : Poly α) : Poly β 
goal: Poly β

full_name: Poly.map_apply
code: @[simp]
theorem map_apply {α β} (f : α → β) (g : Poly α) (v) : map f g v = g (v ∘ f) 
goal: (Poly.map f g) v = g (v ∘ f)

full_name: Dioph
code: /-- A set `S ⊆ ℕ^α` is Diophantine if there exists a polynomial on
  `α ⊕ β` such that `v ∈ S` iff there exists `t : ℕ^β` with `p (v, t) = 0`. -/
def Dioph {α : Type u} (S : Set (α → ℕ)) : Prop 
goal: Prop

full_name: Dioph.ext
code: theorem ext (d : Dioph S) (H : ∀ v, v ∈ S ↔ v ∈ S') : Dioph S' 
goal: Dioph S'

full_name: Dioph.of_no_dummies
code: theorem of_no_dummies (S : Set (α → ℕ)) (p : Poly α) (h : ∀ v, S v ↔ p v = 0) : Dioph S 
goal: Dioph S

full_name: Dioph.inject_dummies_lem
code: theorem inject_dummies_lem (f : β → γ) (g : γ → Option β) (inv : ∀ x, g (f x) = some x)
    (p : Poly (α ⊕ β)) (v : α → ℕ) :
    (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, p.map (inl ⊗ inr ∘ f) (v ⊗ t) = 0 
goal: (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, (Poly.map (Sum.inl ⊗ Sum.inr ∘ f) p) (v ⊗ t) = 0

full_name: Dioph.inject_dummies
code: theorem inject_dummies (f : β → γ) (g : γ → Option β) (inv : ∀ x, g (f x) = some x)
    (p : Poly (α ⊕ β)) (h : ∀ v, S v ↔ ∃ t, p (v ⊗ t) = 0) :
    ∃ q : Poly (α ⊕ γ), ∀ v, S v ↔ ∃ t, q (v ⊗ t) = 0 
goal: ∃ q, ∀ (v : α → ℕ), S v ↔ ∃ t, q (v ⊗ t) = 0

full_name: Dioph.reindex_dioph
code: theorem reindex_dioph (f : α → β) : Dioph S → Dioph {v | v ∘ f ∈ S}
  
goal: Dioph S → Dioph {v | v ∘ f ∈ S}

full_name: Dioph.DiophList.forall
code: theorem DiophList.forall (l : List (Set <| α → ℕ)) (d : l.Forall Dioph) :
    Dioph {v | l.Forall fun S : Set (α → ℕ) => v ∈ S} 
goal: Dioph {v | List.Forall (fun S => v ∈ S) l}

full_name: Dioph.inter
code: theorem inter (d : Dioph S) (d' : Dioph S') : Dioph (S ∩ S') 
goal: Dioph (S ∩ S')

full_name: Dioph.union
code: theorem union : ∀ (_ : Dioph S) (_ : Dioph S'), Dioph (S ∪ S')
  
goal: Dioph S → Dioph S' → Dioph (S ∪ S')

full_name: Dioph.DiophPFun
code: /-- A partial function is Diophantine if its graph is Diophantine. -/
def DiophPFun (f : (α → ℕ) →. ℕ) : Prop 
goal: Prop

full_name: Dioph.DiophFn
code: /-- A function is Diophantine if its graph is Diophantine. -/
def DiophFn (f : (α → ℕ) → ℕ) : Prop 
goal: Prop

full_name: Dioph.reindex_diophFn
code: theorem reindex_diophFn {f : (α → ℕ) → ℕ} (g : α → β) (d : DiophFn f) :
    DiophFn fun v => f (v ∘ g) 
goal: Dioph.DiophFn fun v => f (v ∘ g)

full_name: Dioph.ex_dioph
code: theorem ex_dioph {S : Set (α ⊕ β → ℕ)} : Dioph S → Dioph {v | ∃ x, v ⊗ x ∈ S}
  
goal: Dioph S → Dioph {v | ∃ x, v ⊗ x ∈ S}

full_name: Dioph.ex1_dioph
code: theorem ex1_dioph {S : Set (Option α → ℕ)} : Dioph S → Dioph {v | ∃ x, x ::ₒ v ∈ S}
  
goal: Dioph S → Dioph {v | ∃ x, x ::ₒ v ∈ S}

full_name: Dioph.dom_dioph
code: theorem dom_dioph {f : (α → ℕ) →. ℕ} (d : DiophPFun f) : Dioph f.Dom 
goal: Dioph f.Dom

full_name: Dioph.diophFn_iff_pFun
code: theorem diophFn_iff_pFun (f : (α → ℕ) → ℕ) : DiophFn f = @DiophPFun α f 
goal: Dioph.DiophFn f = Dioph.DiophPFun ↑f

full_name: Dioph.abs_poly_dioph
code: theorem abs_poly_dioph (p : Poly α) : DiophFn fun v => (p v).natAbs 
goal: Dioph.DiophFn fun v => (p v).natAbs

full_name: Dioph.proj_dioph
code: theorem proj_dioph (i : α) : DiophFn fun v => v i 
goal: Dioph.DiophFn fun v => v i

full_name: Dioph.diophPFun_comp1
code: theorem diophPFun_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f} (df : DiophPFun f) :
    Dioph {v : α → ℕ | ∃ h : f.Dom v, f.fn v h ::ₒ v ∈ S} 
goal: Dioph {v | ∃ (h : f.Dom v), f.fn v h ::ₒ v ∈ S}

full_name: Dioph.diophFn_comp1
code: theorem diophFn_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f : (α → ℕ) → ℕ} (df : DiophFn f) :
    Dioph {v | f v ::ₒ v ∈ S} 
goal: Dioph {v | f v ::ₒ v ∈ S}

full_name: Dioph.diophFn_vec_comp1
code: theorem diophFn_vec_comp1 {S : Set (Vector3 ℕ (succ n))} (d : Dioph S) {f : Vector3 ℕ n → ℕ}
    (df : DiophFn f) : Dioph {v : Vector3 ℕ n | (f v::v) ∈ S} 
goal: Dioph {v | Vector3.cons (f v) v ∈ S}

full_name: Dioph.vec_ex1_dioph
code: theorem vec_ex1_dioph (n) {S : Set (Vector3 ℕ (succ n))} (d : Dioph S) :
    Dioph {v : Fin2 n → ℕ | ∃ x, (x::v) ∈ S} 
goal: Dioph {v | ∃ x, Vector3.cons x v ∈ S}

full_name: Dioph.diophFn_vec
code: theorem diophFn_vec (f : Vector3 ℕ n → ℕ) : DiophFn f ↔ Dioph {v | f (v ∘ fs) = v fz} 
goal: Dioph.DiophFn f ↔ Dioph {v | f (v ∘ Fin2.fs) = v Fin2.fz}

full_name: Dioph.diophPFun_vec
code: theorem diophPFun_vec (f : Vector3 ℕ n →. ℕ) : DiophPFun f ↔ Dioph {v | f.graph (v ∘ fs, v fz)} 
goal: Dioph.DiophPFun f ↔ Dioph {v | f.graph (v ∘ Fin2.fs, v Fin2.fz)}

full_name: Dioph.diophFn_compn
code: theorem diophFn_compn :
    ∀ {n} {S : Set (α ⊕ (Fin2 n) → ℕ)} (_ : Dioph S) {f : Vector3 ((α → ℕ) → ℕ) n}
      (_ : VectorAllP DiophFn f), Dioph {v : α → ℕ | (v ⊗ fun i => f i v) ∈ S}
  
goal: Dioph S → ∀ {f : Vector3 ((α → ℕ) → ℕ) n}, VectorAllP Dioph.DiophFn f → Dioph {v | (v ⊗ fun i => f i v) ∈ S}

full_name: Dioph.dioph_comp
code: theorem dioph_comp {S : Set (Vector3 ℕ n)} (d : Dioph S) (f : Vector3 ((α → ℕ) → ℕ) n)
    (df : VectorAllP DiophFn f) : Dioph {v | (fun i => f i v) ∈ S} 
goal: Dioph {v | (fun i => f i v) ∈ S}

full_name: Dioph.diophFn_comp
code: theorem diophFn_comp {f : Vector3 ℕ n → ℕ} (df : DiophFn f) (g : Vector3 ((α → ℕ) → ℕ) n)
    (dg : VectorAllP DiophFn g) : DiophFn fun v => f fun i => g i v 
goal: Dioph.DiophFn fun v => f fun i => g i v

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_inter_1
code: scoped notation:35 x " D∧ " y => Dioph.inter x y
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D∧__1»
code: scoped notation:35 x " D∧ " y => Dioph.inter x y
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_union_1
code: scoped notation:35 x " D∨ " y => Dioph.union x y
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D∨__1»
code: scoped notation:35 x " D∨ " y => Dioph.union x y
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_vec_ex1_dioph_1
code: scoped notation:30 "D∃" => Dioph.vec_ex1_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_termD∃_1»
code: scoped notation:30 "D∃" => Dioph.vec_ex1_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Fin2_ofNat'_1
code: scoped prefix:arg "&" => Fin2.ofNat'
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term&__1»
code: scoped prefix:arg "&" => Fin2.ofNat'
goal: Lean.Macro

full_name: Dioph.proj_dioph_of_nat
code: theorem proj_dioph_of_nat {n : ℕ} (m : ℕ) [IsLT m n] : DiophFn fun v : Vector3 ℕ n => v &m 
goal: Dioph.DiophFn fun v => v (Fin2.ofNat' m)

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_termD&__1»
code: scoped prefix:100 "D&" => Dioph.proj_dioph_of_nat
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_proj_dioph_of_nat_1
code: scoped prefix:100 "D&" => Dioph.proj_dioph_of_nat
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.const_dioph
code: theorem const_dioph (n : ℕ) : DiophFn (const (α → ℕ) n) 
goal: Dioph.DiophFn (Function.const (α → ℕ) n)

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_termD.__1»
code: scoped prefix:100 "D." => Dioph.const_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_const_dioph_1
code: scoped prefix:100 "D." => Dioph.const_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.dioph_comp2
code: theorem dioph_comp2 {S : ℕ → ℕ → Prop} (d : Dioph fun v : Vector3 ℕ 2 => S (v &0) (v &1)) :
    Dioph fun v => S (f v) (g v) 
goal: Dioph fun v => S (f v) (g v)

full_name: Dioph.diophFn_comp2
code: theorem diophFn_comp2 {h : ℕ → ℕ → ℕ} (d : DiophFn fun v : Vector3 ℕ 2 => h (v &0) (v &1)) :
    DiophFn fun v => h (f v) (g v) 
goal: Dioph.DiophFn fun v => h (f v) (g v)

full_name: Dioph.eq_dioph
code: theorem eq_dioph : Dioph fun v => f v = g v 
goal: Dioph fun v => f v = g v

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_eq_dioph_1
code: scoped infixl:50 " D= " => Dioph.eq_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D=__1»
code: scoped infixl:50 " D= " => Dioph.eq_dioph
goal: Lean.Macro

full_name: Dioph.add_dioph
code: theorem add_dioph : DiophFn fun v => f v + g v 
goal: Dioph.DiophFn fun v => f v + g v

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D+__1»
code: scoped infixl:80 " D+ " => Dioph.add_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_add_dioph_1
code: scoped infixl:80 " D+ " => Dioph.add_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.mul_dioph
code: theorem mul_dioph : DiophFn fun v => f v * g v 
goal: Dioph.DiophFn fun v => f v * g v

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D*__1»
code: scoped infixl:90 " D* " => Dioph.mul_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_mul_dioph_1
code: scoped infixl:90 " D* " => Dioph.mul_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.le_dioph
code: theorem le_dioph : Dioph {v | f v ≤ g v} 
goal: Dioph {v | f v ≤ g v}

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D≤__1»
code: scoped infixl:50 " D≤ " => Dioph.le_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_le_dioph_1
code: scoped infixl:50 " D≤ " => Dioph.le_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.lt_dioph
code: theorem lt_dioph : Dioph {v | f v < g v} 
goal: Dioph {v | f v < g v}

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D<__1»
code: scoped infixl:50 " D< " => Dioph.lt_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_lt_dioph_1
code: scoped infixl:50 " D< " => Dioph.lt_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.ne_dioph
code: theorem ne_dioph : Dioph {v | f v ≠ g v} 
goal: Dioph {v | f v ≠ g v}

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_ne_dioph_1
code: scoped infixl:50 " D≠ " => Dioph.ne_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D≠__1»
code: scoped infixl:50 " D≠ " => Dioph.ne_dioph
goal: Lean.Macro

full_name: Dioph.sub_dioph
code: theorem sub_dioph : DiophFn fun v => f v - g v 
goal: Dioph.DiophFn fun v => f v - g v

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_sub_dioph_1
code: scoped infixl:80 " D- " => Dioph.sub_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D-__1»
code: scoped infixl:80 " D- " => Dioph.sub_dioph
goal: Lean.Macro

full_name: Dioph.dvd_dioph
code: theorem dvd_dioph : Dioph fun v => f v ∣ g v 
goal: Dioph fun v => f v ∣ g v

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D∣__1»
code: scoped infixl:50 " D∣ " => Dioph.dvd_dioph
goal: Lean.Macro

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_dvd_dioph_1
code: scoped infixl:50 " D∣ " => Dioph.dvd_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.mod_dioph
code: theorem mod_dioph : DiophFn fun v => f v % g v 
goal: Dioph.DiophFn fun v => f v % g v

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_mod_dioph_1
code: scoped infixl:80 " D% " => Dioph.mod_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D%__1»
code: scoped infixl:80 " D% " => Dioph.mod_dioph
goal: Lean.Macro

full_name: Dioph.modEq_dioph
code: theorem modEq_dioph {h : (α → ℕ) → ℕ} (dh : DiophFn h) : Dioph fun v => f v ≡ g v [MOD h v] 
goal: Dioph fun v => f v ≡ g v [MOD h v]

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_modEq_dioph_1
code: scoped notation " D≡ " => Dioph.modEq_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_termD≡_1»
code: scoped notation " D≡ " => Dioph.modEq_dioph
goal: Lean.Macro

full_name: Dioph.div_dioph
code: theorem div_dioph : DiophFn fun v => f v / g v 
goal: Dioph.DiophFn fun v => f v / g v

full_name: Dioph._aux_Mathlib_NumberTheory_Dioph___unexpand_Dioph_div_dioph_1
code: scoped infixl:80 " D/ " => Dioph.div_dioph
goal: Lean.PrettyPrinter.Unexpander

full_name: Dioph.«_aux_Mathlib_NumberTheory_Dioph___macroRules_Dioph_term_D/__1»
code: scoped infixl:80 " D/ " => Dioph.div_dioph
goal: Lean.Macro

full_name: Dioph.pell_dioph
code: theorem pell_dioph :
    Dioph fun v : Vector3 ℕ 4 => ∃ h : 1 < v &0, xn h (v &1) = v &2 ∧ yn h (v &1) = v &3 
goal: Dioph fun v =>
  ∃ (h : 1 < v (Fin2.ofNat' 0)),
    Pell.xn h (v (Fin2.ofNat' 1)) = v (Fin2.ofNat' 2) ∧ Pell.yn h (v (Fin2.ofNat' 1)) = v (Fin2.ofNat' 3)

full_name: Dioph.xn_dioph
code: theorem xn_dioph : DiophPFun fun v : Vector3 ℕ 2 => ⟨1 < v &0, fun h => xn h (v &1)⟩ 
goal: Dioph.DiophPFun fun v => { Dom := 1 < v (Fin2.ofNat' 0), get := fun h => Pell.xn h (v (Fin2.ofNat' 1)) }

full_name: Dioph.pow_dioph
code: /-- A version of **Matiyasevic's theorem** -/
theorem pow_dioph : DiophFn fun v => f v ^ g v 
goal: Dioph.DiophFn fun v => f v ^ g v