ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Array.SatisfiesM_anyM_iff_exists
theorem SatisfiesM_anyM_iff_exists [Monad m] [LawfulMonad m]
    (p : α → m Bool) (as : Array α) (start stop) (q : Fin as.size → Prop)
    (hp : ∀ i : Fin as.size, start ≤ i.1 → i.1 < stop → SatisfiesM (· = true ↔ q i) (p as[i])) :
    SatisfiesM
      (fun res => res = true ↔ ∃ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop ∧ q i)
      (anyM p as start stop) 
Arguments: {m : Type → Type u_1} {α : Type u_2} [Monad m] [LawfulMonad m] (p : α → m Bool) (as : Array α) (start stop : Nat) (q : Fin as.size → Prop) (hp : ∀ (i : Fin as.size), start ≤ ↑i → ↑i < stop → SatisfiesM (fun x => x = true ↔ q i) (p as[i]))
Goal: SatisfiesM (fun res => res = true ↔ ∃ i, start ≤ ↑i ∧ ↑i < stop ∧ q i) (Array.anyM p as start stop)
-- Array.SatisfiesM_foldrM
theorem SatisfiesM_foldrM [Monad m] [LawfulMonad m]
    {as : Array α} (motive : Nat → β → Prop)
    {init : β} (h0 : motive as.size init) {f : α → β → m β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → SatisfiesM (motive i.1) (f as[i] b)) :
    SatisfiesM (motive 0) (as.foldrM f init) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive as.size init) {f : α → β → m β} (hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → SatisfiesM (motive ↑i) (f as[i] b))
Goal: SatisfiesM (motive 0) (Array.foldrM f init as as.size)
-- Array.SatisfiesM_foldrM.go
theorem SatisfiesM_foldrM [Monad m] [LawfulMonad m]
    {as : Array α} (motive : Nat → β → Prop)
    {init : β} (h0 : motive as.size init) {f : α → β → m β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → SatisfiesM (motive i.1) (f as[i] b)) :
    SatisfiesM (motive 0) (as.foldrM f init) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] {as : Array α} (motive : Nat → β → Prop) {f : α → β → m β} (hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → SatisfiesM (motive ↑i) (f as[i] b)) {i : Nat} {b : β} (hi : i ≤ as.size) (H : motive i b)
Goal: SatisfiesM (motive 0) (Array.foldrM.fold f as 0 i hi b)
-- Array.SatisfiesM_mapIdxM.go
theorem SatisfiesM_mapIdxM [Monad m] [LawfulMonad m] (as : Array α) (f : Fin as.size → α → m β)
    (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, motive i.1 → SatisfiesM (p i · ∧ motive (i + 1)) (f i as[i])) :
    SatisfiesM
      (fun arr => motive as.size ∧ ∃ eq : arr.size = as.size, ∀ i h, p ⟨i, h⟩ arr[i])
      (Array.mapIdxM as f) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (as : Array α) (f : Fin as.size → α → m β) (motive : Nat → Prop) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), motive ↑i → SatisfiesM (fun x => p i x ∧ motive (↑i + 1)) (f i as[i])) {bs : Array β} {i j : Nat} {h : i + j = as.size} (h₁ : j = bs.size) (h₂ : ∀ (i : Nat) (h : i < as.size) (h' : i < bs.size), p ⟨i, h⟩ bs[i]) (hm : motive j)
Goal: SatisfiesM (fun arr => motive as.size ∧ ∃ eq, ∀ (i_1 : Nat) (h : i_1 < as.size), p ⟨i_1, h⟩ arr[i_1])
  (Array.mapIdxM.map as f i j h bs)
-- Array.SatisfiesM_mapIdxM
theorem SatisfiesM_mapIdxM [Monad m] [LawfulMonad m] (as : Array α) (f : Fin as.size → α → m β)
    (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, motive i.1 → SatisfiesM (p i · ∧ motive (i + 1)) (f i as[i])) :
    SatisfiesM
      (fun arr => motive as.size ∧ ∃ eq : arr.size = as.size, ∀ i h, p ⟨i, h⟩ arr[i])
      (Array.mapIdxM as f) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (as : Array α) (f : Fin as.size → α → m β) (motive : Nat → Prop) (h0 : motive 0) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), motive ↑i → SatisfiesM (fun x => p i x ∧ motive (↑i + 1)) (f i as[i]))
Goal: SatisfiesM (fun arr => motive as.size ∧ ∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ arr[i]) (as.mapIdxM f)
-- Array.size_modifyM
theorem size_modifyM [Monad m] [LawfulMonad m] (a : Array α) (i : Nat) (f : α → m α) :
    SatisfiesM (·.size = a.size) (a.modifyM i f) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] [LawfulMonad m] (a : Array α) (i : Nat) (f : α → m α)
Goal: SatisfiesM (fun x => x.size = a.size) (a.modifyM i f)
-- List.tail_nil
@[simp] theorem tail_nil : @tail α [] = [] 
Arguments: {α : Type u_1}
Goal: [].tail = []
-- List.tail_cons
@[simp] theorem tail_cons : @tail α (a::as) = as 
Arguments: {α : Type u_1} {a : α} {as : List α}
Goal: (a :: as).tail = as
-- List.replaceF_eq_replaceFTR.go
@[csimp] theorem replaceF_eq_replaceFTR : @replaceF = @replaceFTR 
Arguments: (α : Type u_1) (p : α → Option α) (acc : Array α) (xs : List α)
Goal: List.replaceFTR.go p xs acc = acc.data ++ List.replaceF p xs
-- List.replaceF_eq_replaceFTR
@[csimp] theorem replaceF_eq_replaceFTR : @replaceF = @replaceFTR 
Goal: @List.replaceF = @List.replaceFTR
-- List.splitOnP_eq_splitOnPTR
@[csimp] theorem splitOnP_eq_splitOnPTR : @splitOnP = @splitOnPTR 
Goal: @List.splitOnP = @List.splitOnPTR
-- List.modifyHead_nil
@[simp] theorem modifyHead_nil (f : α → α) : [].modifyHead f = [] 
Arguments: {α : Type u_1} (f : α → α)
Goal: List.modifyHead f [] = []
-- List.modifyHead_cons
@[simp] theorem modifyHead_cons (a : α) (l : List α) (f : α → α) :
    (a :: l).modifyHead f = f a :: l 
Arguments: {α : Type u_1} (a : α) (l : List α) (f : α → α)
Goal: List.modifyHead f (a :: l) = f a :: l
-- List.modifyNthTR_go_eq
theorem modifyNthTR_go_eq : ∀ l n, modifyNthTR.go f l n acc = acc.data ++ modifyNth f n l
  
Goal: ∀ {α : Type u_1} {f : α → α} {acc : Array α} (l : List α) (n : Nat),
  List.modifyNthTR.go f l n acc = acc.data ++ List.modifyNth f n l
-- List.modifyNth_eq_modifyNthTR
@[csimp] theorem modifyNth_eq_modifyNthTR : @modifyNth = @modifyNthTR 
Goal: @List.modifyNth = @List.modifyNthTR
-- List.insertNthTR_go_eq
theorem insertNthTR_go_eq : ∀ n l, insertNthTR.go a n l acc = acc.data ++ insertNth n a l
  
Goal: ∀ {α : Type u_1} {a : α} {acc : Array α} (n : Nat) (l : List α),
  List.insertNthTR.go a n l acc = acc.data ++ List.insertNth n a l
-- List.insertNth_eq_insertNthTR
@[csimp] theorem insertNth_eq_insertNthTR : @insertNth = @insertNthTR 
Goal: @List.insertNth = @List.insertNthTR
-- List.headD_eq_head?
@[simp] theorem headD_eq_head? (l) (a : α) : headD l a = (head? l).getD a 
Arguments: {α : Type u_1} (l : List α) (a : α)
Goal: l.headD a = l.head?.getD a
-- List.takeD_zero
@[simp] theorem takeD_zero (l) (a : α) : takeD 0 l a = [] 
Arguments: {α : Type u_1} (l : List α) (a : α)
Goal: List.takeD 0 l a = []
-- List.takeD_succ
@[simp] theorem takeD_succ (l) (a : α) :
    takeD (n+1) l a = l.head?.getD a :: takeD n l.tail a 
Arguments: {α : Type u_1} {n : Nat} (l : List α) (a : α)
Goal: List.takeD (n + 1) l a = l.head?.getD a :: List.takeD n l.tail a
-- List.takeD_nil
@[simp] theorem takeD_nil (n) (a : α) : takeD n [] a = replicate n a 
Arguments: {α : Type u_1} (n : Nat) (a : α)
Goal: List.takeD n [] a = List.replicate n a
-- List.takeDTR_go_eq
theorem takeDTR_go_eq : ∀ n l, takeDTR.go dflt n l acc = acc.data ++ takeD n l dflt
  
Goal: ∀ {α : Type u_1} {dflt : α} {acc : Array α} (n : Nat) (l : List α),
  List.takeDTR.go dflt n l acc = acc.data ++ List.takeD n l dflt
-- List.takeD_eq_takeDTR
@[csimp] theorem takeD_eq_takeDTR : @takeD = @takeDTR 
Goal: @List.takeD = @List.takeDTR
-- List.leftpad_eq_leftpadTR
@[csimp] theorem leftpad_eq_leftpadTR : @leftpad = @leftpadTR 
Goal: @List.leftpad = @List.leftpadTR
-- List.scanlTR_go_eq
theorem scanlTR_go_eq : ∀ l, scanlTR.go f l a acc = acc.data ++ scanl f a l
  
Goal: ∀ {α : Type u_1} {α_1 : Type u_2} {f : α → α_1 → α} {a : α} {acc : Array α} (l : List α_1),
  List.scanlTR.go f l a acc = acc.data ++ List.scanl f a l
-- List.scanl_eq_scanlTR
@[csimp] theorem scanl_eq_scanlTR : @scanl = @scanlTR 
Goal: @List.scanl = @List.scanlTR
-- List.inits_eq_initsTR
@[csimp] theorem inits_eq_initsTR : @inits = @initsTR 
Goal: @List.inits = @List.initsTR
-- List.tails_eq_tailsTR
@[csimp] theorem tails_eq_tailsTR : @tails = @tailsTR 
Goal: @List.tails = @List.tailsTR
-- List.forall₂_cons
@[simp] theorem forall₂_cons {R : α → β → Prop} {a b l₁ l₂} :
    Forall₂ R (a :: l₁) (b :: l₂) ↔ R a b ∧ Forall₂ R l₁ l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {R : α → β → Prop} {a : α} {b : β} {l₁ : List α} {l₂ : List β}
Goal: List.Forall₂ R (a :: l₁) (b :: l₂) ↔ R a b ∧ List.Forall₂ R l₁ l₂
-- List.all₂_eq_true
@[simp] theorem all₂_eq_true {r : α → β → Bool} :
    ∀ l₁ l₂, all₂ r l₁ l₂ ↔ Forall₂ (r · ·) l₁ l₂
  
Arguments: {α : Type u_1} {β : Type u_2} {r : α → β → Bool} (l₁ : List α) (l₂ : List β)
Goal: List.all₂ r l₁ l₂ = true ↔ List.Forall₂ (fun x x_1 => r x x_1 = true) l₁ l₂
-- List.sections_eq_nil_of_isEmpty
theorem sections_eq_nil_of_isEmpty : ∀ {L}, L.any isEmpty → @sections α L = []
  
Arguments: {α : Type u_1} {L : List (List α)}
Goal: L.any List.isEmpty = true → L.sections = []
-- List.sections_eq_sectionsTR
@[csimp] theorem sections_eq_sectionsTR : @sections = @sectionsTR 
Goal: @List.sections = @List.sectionsTR
-- List.eraseP_eq_erasePTR.go
@[csimp] theorem eraseP_eq_erasePTR : @eraseP = @erasePTR 
Arguments: (α : Type u_1) (p : α → Bool) (l : List α) (acc : Array α) (xs : List α)
Goal: l = acc.data ++ xs → List.erasePTR.go p l xs acc = acc.data ++ List.eraseP p xs
-- List.eraseP_eq_erasePTR
@[csimp] theorem eraseP_eq_erasePTR : @eraseP = @erasePTR 
Goal: @List.eraseP = @List.erasePTR
-- List.product_eq_productTR
@[csimp] theorem product_eq_productTR : @product = @productTR 
Goal: @List.product = @List.productTR
-- List.sigma_eq_sigmaTR
@[csimp] theorem sigma_eq_sigmaTR : @List.sigma = @sigmaTR 
Goal: @List.sigma = @List.sigmaTR
-- List.ofFn_eq_ofFnTR.go
@[csimp] theorem ofFn_eq_ofFnTR : @ofFn = @ofFnTR 
Arguments: (α : Type u_1) (n : Nat) (f : Fin n → α) (i j : Nat) (h : i + j = n) (h' : j ≤ n)
Goal: List.ofFnTR.go f j h' (List.ofFn.go f i j h) = List.ofFn f
-- List.ofFn_eq_ofFnTR
@[csimp] theorem ofFn_eq_ofFnTR : @ofFn = @ofFnTR 
Goal: @List.ofFn = @List.ofFnTR
-- List.takeWhile₂_eq_takeWhile₂TR
@[csimp] theorem takeWhile₂_eq_takeWhile₂TR : @takeWhile₂ = @takeWhile₂TR 
Goal: @List.takeWhile₂ = @List.takeWhile₂TR
-- List.takeWhile₂_eq_takeWhile₂TR.go
@[csimp] theorem takeWhile₂_eq_takeWhile₂TR : @takeWhile₂ = @takeWhile₂TR 
Arguments: (α : Type u_2) (β : Type u_1) (R : α → β → Bool) (as : List α) (bs : List β) (acca : List α) (accb : List β)
Goal: List.takeWhile₂TR.go R as bs acca accb =
  (acca.reverse ++ (List.takeWhile₂ R as bs).fst, accb.reverse ++ (List.takeWhile₂ R as bs).snd)
-- List.pairwise_cons
@[simp] theorem pairwise_cons : Pairwise R (a::l) ↔ (∀ a' ∈ l, R a a') ∧ Pairwise R l 
Arguments: {α : Type u_1} {R : α → α → Prop} {a : α} {l : List α}
Goal: List.Pairwise R (a :: l) ↔ (∀ (a' : α), a' ∈ l → R a a') ∧ List.Pairwise R l
-- List.range'_eq_range'TR
@[csimp] theorem range'_eq_range'TR : @range' = @range'TR 
Goal: @List.range' = @List.range'TR
-- List.range'_eq_range'TR.go
@[csimp] theorem range'_eq_range'TR : @range' = @range'TR 
Arguments: (step : Nat := 1) (s n m : Nat)
Goal: List.range'TR.go step n (s + step * n) (List.range' (s + step * n) m step) = List.range' s (n + m) step
-- List.dropSlice_zero₂
theorem dropSlice_zero₂ : ∀ n l, @dropSlice α n 0 l = l
  
Arguments: {α : Type u_1} (n : Nat) (l : List α)
Goal: List.dropSlice n 0 l = l
-- List.dropSlice_eq_dropSliceTR.go
@[csimp] theorem dropSlice_eq_dropSliceTR : @dropSlice = @dropSliceTR 
Arguments: (α : Type u_1) (l : List α) (m : Nat) (acc : Array α) (xs : List α) (n : Nat)
Goal: l = acc.data ++ xs → List.dropSliceTR.go l m xs n acc = acc.data ++ List.dropSlice n (m + 1) xs
-- List.dropSlice_eq_dropSliceTR
@[csimp] theorem dropSlice_eq_dropSliceTR : @dropSlice = @dropSliceTR 
Goal: @List.dropSlice = @List.dropSliceTR
-- List.zipWithLeft'_eq_zipWithLeft'TR.go
@[csimp] theorem zipWithLeft'_eq_zipWithLeft'TR : @zipWithLeft' = @zipWithLeft'TR 
Arguments: (α : Type u_3) (β : Type u_2) (γ : Type u_1) (f : α → Option β → γ) (acc : Array γ) (as : List α) (bs : List β)
Goal: List.zipWithLeft'TR.go f as bs acc =
  match List.zipWithLeft' f as bs with
  | (l, r) => (acc.toList ++ l, r)
-- List.zipWithLeft'_eq_zipWithLeft'TR
@[csimp] theorem zipWithLeft'_eq_zipWithLeft'TR : @zipWithLeft' = @zipWithLeft'TR 
Goal: @List.zipWithLeft' = @List.zipWithLeft'TR
-- List.zipWithLeft_eq_zipWithLeftTR
@[csimp] theorem zipWithLeft_eq_zipWithLeftTR : @zipWithLeft = @zipWithLeftTR 
Goal: @List.zipWithLeft = @List.zipWithLeftTR
-- List.zipWithLeft_eq_zipWithLeftTR.go
@[csimp] theorem zipWithLeft_eq_zipWithLeftTR : @zipWithLeft = @zipWithLeftTR 
Arguments: (α : Type u_3) (β : Type u_2) (γ : Type u_1) (f : α → Option β → γ) (acc : Array γ) (as : List α) (bs : List β)
Goal: List.zipWithLeftTR.go f as bs acc = acc.toList ++ List.zipWithLeft f as bs
-- List.fillNones_eq_fillNonesTR
@[csimp] theorem fillNones_eq_fillNonesTR : @fillNones = @fillNonesTR 
Goal: @List.fillNones = @List.fillNonesTR
-- List.fillNones_eq_fillNonesTR.go
@[csimp] theorem fillNones_eq_fillNonesTR : @fillNones = @fillNonesTR 
Arguments: (α : Type u_1) (acc : Array α) (as : List (Option α)) (as' : List α)
Goal: List.fillNonesTR.go as as' acc = acc.data ++ as.fillNones as'
-- List.takeList_eq_takeListTR
@[csimp] theorem takeList_eq_takeListTR : @takeList = @takeListTR 
Goal: @List.takeList = @List.takeListTR
-- List.takeList_eq_takeListTR.go
@[csimp] theorem takeList_eq_takeListTR : @takeList = @takeListTR 
Arguments: (α : Type u_1) (acc : Array (List α)) (ns : List Nat) (xs : List α)
Goal: List.takeListTR.go ns xs acc =
  match xs.takeList ns with
  | (l, r) => (acc.toList ++ l, r)
-- Rat.ext
theorem ext : {p q : Rat} → p.num = q.num → p.den = q.den → p = q
  
Arguments: {p q : Rat}
Goal: p.num = q.num → p.den = q.den → p = q
-- Rat.mk_den_one
@[simp] theorem mk_den_one {r : Int} :
    ⟨r, 1, Nat.one_ne_zero, (Nat.coprime_one_right _)⟩ = (r : Rat) 
Arguments: {r : Int}
Goal: { num := r, den := 1, den_nz := Nat.one_ne_zero, reduced := ⋯ } = ↑r
-- Rat.zero_num
@[simp] theorem zero_num : (0 : Rat).num = 0 
Goal: Rat.num 0 = 0
-- Rat.zero_den
@[simp] theorem zero_den : (0 : Rat).den = 1 
Goal: Rat.den 0 = 1
-- Rat.one_num
@[simp] theorem one_num : (1 : Rat).num = 1 
Goal: Rat.num 1 = 1
-- Rat.one_den
@[simp] theorem one_den : (1 : Rat).den = 1 
Goal: Rat.den 1 = 1
-- Rat.maybeNormalize_eq
@[simp] theorem maybeNormalize_eq {num den g} (den_nz reduced) :
    maybeNormalize num den g den_nz reduced =
    { num := num.div g, den := den / g, den_nz, reduced } 
Arguments: {num : Int} {den g : Nat} (den_nz : den / g ≠ 0) (reduced : (num.div ↑g).natAbs.Coprime (den / g))
Goal: Rat.maybeNormalize num den g den_nz reduced =
  { num := num.div ↑g, den := den / g, den_nz := den_nz, reduced := reduced }
-- Rat.normalize.reduced'
theorem normalize.reduced' {num : Int} {den g : Nat} (den_nz : den ≠ 0)
    (e : g = num.natAbs.gcd den) : (num / g).natAbs.Coprime (den / g) 
Arguments: {num : Int} {den g : Nat} (den_nz : den ≠ 0) (e : g = num.natAbs.gcd den)
Goal: (num / ↑g).natAbs.Coprime (den / g)
-- Rat.normalize_eq
theorem normalize_eq {num den} (den_nz) : normalize num den den_nz =
    { num := num / num.natAbs.gcd den
      den := den / num.natAbs.gcd den
      den_nz := normalize.den_nz den_nz rfl
      reduced := normalize.reduced' den_nz rfl } 
Arguments: {num : Int} {den : Nat} (den_nz : den ≠ 0)
Goal: Rat.normalize num den den_nz =
  { num := num / ↑(num.natAbs.gcd den), den := den / num.natAbs.gcd den, den_nz := ⋯, reduced := ⋯ }
-- Rat.normalize_zero
@[simp] theorem normalize_zero (nz) : normalize 0 d nz = 0 
Arguments: {d : Nat} (nz : d ≠ 0)
Goal: Rat.normalize 0 d nz = 0
-- Rat.mk_eq_normalize
theorem mk_eq_normalize (num den nz c) : ⟨num, den, nz, c⟩ = normalize num den nz 
Arguments: (num : Int) (den : Nat) (nz : den ≠ 0) (c : num.natAbs.Coprime den)
Goal: { num := num, den := den, den_nz := nz, reduced := c } = Rat.normalize num den nz
-- Rat.normalize_self
theorem normalize_self (r : Rat) : normalize r.num r.den r.den_nz = r 
Arguments: (r : Rat)
Goal: Rat.normalize r.num r.den ⋯ = r
-- Rat.normalize_mul_left
theorem normalize_mul_left {a : Nat} (d0 : d ≠ 0) (a0 : a ≠ 0) :
    normalize (↑a * n) (a * d) (Nat.mul_ne_zero a0 d0) = normalize n d d0 
Arguments: {d : Nat} {n : Int} {a : Nat} (d0 : d ≠ 0) (a0 : a ≠ 0)
Goal: Rat.normalize (↑a * n) (a * d) ⋯ = Rat.normalize n d d0
-- Rat.normalize_mul_right
theorem normalize_mul_right {a : Nat} (d0 : d ≠ 0) (a0 : a ≠ 0) :
    normalize (n * a) (d * a) (Nat.mul_ne_zero d0 a0) = normalize n d d0 
Arguments: {d : Nat} {n : Int} {a : Nat} (d0 : d ≠ 0) (a0 : a ≠ 0)
Goal: Rat.normalize (n * ↑a) (d * a) ⋯ = Rat.normalize n d d0
-- Rat.normalize_eq_iff
theorem normalize_eq_iff (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0) :
    normalize n₁ d₁ z₁ = normalize n₂ d₂ z₂ ↔ n₁ * d₂ = n₂ * d₁ 
Arguments: {d₁ d₂ : Nat} {n₁ n₂ : Int} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0)
Goal: Rat.normalize n₁ d₁ z₁ = Rat.normalize n₂ d₂ z₂ ↔ n₁ * ↑d₂ = n₂ * ↑d₁
-- Rat.maybeNormalize_eq_normalize
theorem maybeNormalize_eq_normalize {num : Int} {den g : Nat} (den_nz reduced)
    (hn : ↑g ∣ num) (hd : g ∣ den) :
    maybeNormalize num den g den_nz reduced = normalize num den (mt (by simp [·]) den_nz) 
Arguments: {num : Int} {den g : Nat} (den_nz : den / g ≠ 0) (reduced : (num.div ↑g).natAbs.Coprime (den / g)) (hn : ↑g ∣ num) (hd : g ∣ den)
Goal: Rat.maybeNormalize num den g den_nz reduced = Rat.normalize num den ⋯
-- Rat.normalize_eq_zero
@[simp] theorem normalize_eq_zero (d0 : d ≠ 0) : normalize n d d0 = 0 ↔ n = 0 
Arguments: {d : Nat} {n : Int} (d0 : d ≠ 0)
Goal: Rat.normalize n d d0 = 0 ↔ n = 0
-- Rat.normalize_num_den'
theorem normalize_num_den' (num den nz) : ∃ d : Nat, d ≠ 0 ∧
    num = (normalize num den nz).num * d ∧ den = (normalize num den nz).den * d 
Arguments: (num : Int) (den : Nat) (nz : den ≠ 0)
Goal: ∃ d, d ≠ 0 ∧ num = (Rat.normalize num den nz).num * ↑d ∧ den = (Rat.normalize num den nz).den * d
-- Rat.normalize_num_den
theorem normalize_num_den (h : normalize n d z = ⟨n', d', z', c⟩) :
    ∃ m : Nat, m ≠ 0 ∧ n = n' * m ∧ d = d' * m 
Arguments: {n : Int} {d : Nat} {z : d ≠ 0} {n' : Int} {d' : Nat} {z' : d' ≠ 0} {c : n'.natAbs.Coprime d'} (h : Rat.normalize n d z = { num := n', den := d', den_nz := z', reduced := c })
Goal: ∃ m, m ≠ 0 ∧ n = n' * ↑m ∧ d = d' * m
-- Rat.normalize_eq_mkRat
theorem normalize_eq_mkRat {num den} (den_nz) : normalize num den den_nz = mkRat num den 
Arguments: {num : Int} {den : Nat} (den_nz : den ≠ 0)
Goal: Rat.normalize num den den_nz = mkRat num den
-- Rat.mkRat_num_den
theorem mkRat_num_den (z : d ≠ 0) (h : mkRat n d = ⟨n', d', z', c⟩) :
    ∃ m : Nat, m ≠ 0 ∧ n = n' * m ∧ d = d' * m 
Arguments: {d : Nat} {n n' : Int} {d' : Nat} {z' : d' ≠ 0} {c : n'.natAbs.Coprime d'} (z : d ≠ 0) (h : mkRat n d = { num := n', den := d', den_nz := z', reduced := c })
Goal: ∃ m, m ≠ 0 ∧ n = n' * ↑m ∧ d = d' * m
-- Rat.mkRat_def
theorem mkRat_def (n d) : mkRat n d = if d0 : d = 0 then 0 else normalize n d d0 
Arguments: (n : Int) (d : Nat)
Goal: mkRat n d = if d0 : d = 0 then 0 else Rat.normalize n d d0
-- Rat.mkRat_self
theorem mkRat_self (a : Rat) : mkRat a.num a.den = a 
Arguments: (a : Rat)
Goal: mkRat a.num a.den = a
-- Rat.mk_eq_mkRat
theorem mk_eq_mkRat (num den nz c) : ⟨num, den, nz, c⟩ = mkRat num den 
Arguments: (num : Int) (den : Nat) (nz : den ≠ 0) (c : num.natAbs.Coprime den)
Goal: { num := num, den := den, den_nz := nz, reduced := c } = mkRat num den
-- Rat.zero_mkRat
@[simp] theorem zero_mkRat (n) : mkRat 0 n = 0 
Arguments: (n : Nat)
Goal: mkRat 0 n = 0
-- Rat.mkRat_zero
@[simp] theorem mkRat_zero (n) : mkRat n 0 = 0 
Arguments: (n : Int)
Goal: mkRat n 0 = 0
-- Rat.mkRat_eq_zero
theorem mkRat_eq_zero (d0 : d ≠ 0) : mkRat n d = 0 ↔ n = 0 
Arguments: {d : Nat} {n : Int} (d0 : d ≠ 0)
Goal: mkRat n d = 0 ↔ n = 0
-- Rat.mkRat_ne_zero
theorem mkRat_ne_zero (d0 : d ≠ 0) : mkRat n d ≠ 0 ↔ n ≠ 0 
Arguments: {d : Nat} {n : Int} (d0 : d ≠ 0)
Goal: mkRat n d ≠ 0 ↔ n ≠ 0
-- Rat.mkRat_mul_left
theorem mkRat_mul_left {a : Nat} (a0 : a ≠ 0) : mkRat (↑a * n) (a * d) = mkRat n d 
Arguments: {n : Int} {d a : Nat} (a0 : a ≠ 0)
Goal: mkRat (↑a * n) (a * d) = mkRat n d
-- Rat.mkRat_mul_right
theorem mkRat_mul_right {a : Nat} (a0 : a ≠ 0) : mkRat (n * a) (d * a) = mkRat n d 
Arguments: {n : Int} {d a : Nat} (a0 : a ≠ 0)
Goal: mkRat (n * ↑a) (d * a) = mkRat n d
-- Rat.mkRat_eq_iff
theorem mkRat_eq_iff (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0) :
    mkRat n₁ d₁ = mkRat n₂ d₂ ↔ n₁ * d₂ = n₂ * d₁ 
Arguments: {d₁ d₂ : Nat} {n₁ n₂ : Int} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0)
Goal: mkRat n₁ d₁ = mkRat n₂ d₂ ↔ n₁ * ↑d₂ = n₂ * ↑d₁
-- Rat.divInt_ofNat
@[simp] theorem divInt_ofNat (num den) : num /. (den : Nat) = mkRat num den 
Arguments: (num : Int) (den : Nat)
Goal: num /. ↑den = mkRat num den
-- Rat.mk_eq_divInt
theorem mk_eq_divInt (num den nz c) : ⟨num, den, nz, c⟩ = num /. (den : Nat) 
Arguments: (num : Int) (den : Nat) (nz : den ≠ 0) (c : num.natAbs.Coprime den)
Goal: { num := num, den := den, den_nz := nz, reduced := c } = num /. ↑den
-- Rat.divInt_self
theorem divInt_self (a : Rat) : a.num /. a.den = a 
Arguments: (a : Rat)
Goal: a.num /. ↑a.den = a
-- Rat.zero_divInt
@[simp] theorem zero_divInt (n) : 0 /. n = 0 
Arguments: (n : Int)
Goal: 0 /. n = 0
-- Rat.divInt_zero
@[simp] theorem divInt_zero (n) : n /. 0 = 0 
Arguments: (n : Int)
Goal: n /. 0 = 0
-- Rat.neg_divInt_neg
theorem neg_divInt_neg (num den) : -num /. -den = num /. den 
Arguments: (num den : Int)
Goal: -num /. -den = num /. den
-- Rat.divInt_neg'
theorem divInt_neg' (num den) : num /. -den = -num /. den 
Arguments: (num den : Int)
Goal: num /. -den = -num /. den
-- Rat.divInt_eq_iff
theorem divInt_eq_iff (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0) :
    n₁ /. d₁ = n₂ /. d₂ ↔ n₁ * d₂ = n₂ * d₁ 
Arguments: {d₁ d₂ n₁ n₂ : Int} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0)
Goal: n₁ /. d₁ = n₂ /. d₂ ↔ n₁ * d₂ = n₂ * d₁
-- Rat.divInt_mul_left
theorem divInt_mul_left {a : Int} (a0 : a ≠ 0) : (a * n) /. (a * d) = n /. d 
Arguments: {n d a : Int} (a0 : a ≠ 0)
Goal: a * n /. (a * d) = n /. d
-- Rat.divInt_mul_right
theorem divInt_mul_right {a : Int} (a0 : a ≠ 0) : (n * a) /. (d * a) = n /. d 
Arguments: {n d a : Int} (a0 : a ≠ 0)
Goal: n * a /. (d * a) = n /. d
-- Rat.divInt_num_den
theorem divInt_num_den (z : d ≠ 0) (h : n /. d = ⟨n', d', z', c⟩) :
    ∃ m, m ≠ 0 ∧ n = n' * m ∧ d = d' * m 
Arguments: {d n n' : Int} {d' : Nat} {z' : d' ≠ 0} {c : n'.natAbs.Coprime d'} (z : d ≠ 0) (h : n /. d = { num := n', den := d', den_nz := z', reduced := c })
Goal: ∃ m, m ≠ 0 ∧ n = n' * m ∧ d = ↑d' * m
-- Rat.ofInt_ofNat
@[simp] theorem ofInt_ofNat : ofInt (OfNat.ofNat n) = OfNat.ofNat n 
Arguments: {n : Nat}
Goal: Rat.ofInt (OfNat.ofNat n) = OfNat.ofNat n
-- Rat.ofInt_num
@[simp] theorem ofInt_num : (ofInt n : Rat).num = n 
Arguments: {n : Int}
Goal: (Rat.ofInt n).num = n
-- Rat.ofInt_den
@[simp] theorem ofInt_den : (ofInt n : Rat).den = 1 
Arguments: {n : Int}
Goal: (Rat.ofInt n).den = 1
-- Rat.ofNat_num
@[simp] theorem ofNat_num : (OfNat.ofNat n : Rat).num = OfNat.ofNat n 
Arguments: {n : Nat}
Goal: Rat.num (OfNat.ofNat n) = OfNat.ofNat n
-- Rat.ofNat_den
@[simp] theorem ofNat_den : (OfNat.ofNat n : Rat).den = 1 
Arguments: {n : Nat}
Goal: Rat.den (OfNat.ofNat n) = 1
-- Rat.add_def
theorem add_def (a b : Rat) :
    a + b = normalize (a.num * b.den + b.num * a.den) (a.den * b.den)
      (Nat.mul_ne_zero a.den_nz b.den_nz) 
Arguments: (a b : Rat)
Goal: a + b = Rat.normalize (a.num * ↑b.den + b.num * ↑a.den) (a.den * b.den) ⋯
-- Rat.add_def'
theorem add_def' (a b : Rat) : a + b = mkRat (a.num * b.den + b.num * a.den) (a.den * b.den) 
Arguments: (a b : Rat)
Goal: a + b = mkRat (a.num * ↑b.den + b.num * ↑a.den) (a.den * b.den)
-- Rat.normalize_add_normalize
theorem normalize_add_normalize (n₁ n₂) {d₁ d₂} (z₁ z₂) :
    normalize n₁ d₁ z₁ + normalize n₂ d₂ z₂ =
    normalize (n₁ * d₂ + n₂ * d₁) (d₁ * d₂) (Nat.mul_ne_zero z₁ z₂) 
Arguments: (n₁ n₂ : Int) {d₁ d₂ : Nat} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0)
Goal: Rat.normalize n₁ d₁ z₁ + Rat.normalize n₂ d₂ z₂ = Rat.normalize (n₁ * ↑d₂ + n₂ * ↑d₁) (d₁ * d₂) ⋯
-- Rat.mkRat_add_mkRat
theorem mkRat_add_mkRat (n₁ n₂ : Int) {d₁ d₂} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0) :
    mkRat n₁ d₁ + mkRat n₂ d₂ = mkRat (n₁ * d₂ + n₂ * d₁) (d₁ * d₂) 
Arguments: (n₁ n₂ : Int) {d₁ d₂ : Nat} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0)
Goal: mkRat n₁ d₁ + mkRat n₂ d₂ = mkRat (n₁ * ↑d₂ + n₂ * ↑d₁) (d₁ * d₂)