tasksource/leandojo huggingface dataset:
Theorem: Nat.fib_succ_eq_sum_choose
File: Mathlib/Data/Nat/Fib.lean

tactic: rw [fib_add_two, h1, h2, Finset.Nat.antidiagonal_succ_succ', Finset.Nat.antidiagonal_succ']
state_before: n : ℕ
h1 : fib (n + 1) = ∑ p in Finset.Nat.antidiagonal n, choose p.fst p.snd
h2 : fib (succ n + 1) = ∑ p in Finset.Nat.antidiagonal (succ n), choose p.fst p.snd
⊢ fib (succ (succ n) + 1) = ∑ p in Finset.Nat.antidiagonal (succ (succ n)), choose p.fst p.snd

tactic: simp [choose_succ_succ, Finset.sum_add_distrib, add_left_comm]
state_before: n : ℕ
h1 : fib (n + 1) = ∑ p in Finset.Nat.antidiagonal n, choose p.fst p.snd
h2 : fib (succ n + 1) = ∑ p in Finset.Nat.antidiagonal (succ n), choose p.fst p.snd
⊢ ∑ p in Finset.Nat.antidiagonal n, choose p.fst p.snd +
      ∑ p in
        Finset.cons (n + 1, 0)
          (Finset.map (Function.Embedding.prodMap (Function.Embedding.refl ℕ) { toFun := succ, inj' := succ_injective })
            (Finset.Nat.antidiagonal n))
          (_ :
            ¬(n + 1, 0) ∈
                Finset.map
                  (Function.Embedding.prodMap (Function.Embedding.refl ℕ) { toFun := succ, inj' := succ_injective })
                  (Finset.Nat.antidiagonal n)),
        choose p.fst p.snd =
    ∑ p in
      Finset.cons (0, n + 2)
        (Finset.cons (n + 2, 0)
          (Finset.map
            (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }
              { toFun := succ, inj' := succ_injective })
            (Finset.Nat.antidiagonal n))
          (_ :
            ¬(n + 2, 0) ∈
                Finset.map
                  (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }
                    { toFun := succ, inj' := succ_injective })
                  (Finset.Nat.antidiagonal n)))
        (_ :
          ¬(0, n + 2) ∈
              Finset.cons (n + 2, 0)
                (Finset.map
                  (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }
                    { toFun := succ, inj' := succ_injective })
                  (Finset.Nat.antidiagonal n))
                (_ :
                  ¬(n + 2, 0) ∈
                      Finset.map
                        (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }
                          { toFun := succ, inj' := succ_injective })
                        (Finset.Nat.antidiagonal n))),
      choose p.fst p.snd
Theorem: IsCoprime.of_mul_left_left
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rwa [mul_right_comm, mul_assoc]
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
H : IsCoprime (x * y) z
a b : R
h : a * (x * y) + b * z = 1
⊢ a * y * x + b * z = 1
Theorem: CategoryTheory.Limits.limit.lift_pre
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: ext
state_before: J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F : J ⥤ C
inst✝¹ : HasLimit F
E : K ⥤ J
inst✝ : HasLimit (E ⋙ F)
c : Cone F
⊢ lift F c ≫ pre F E = lift (E ⋙ F) (Cone.whisker E c)

tactic: simp
state_before: case w
J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F : J ⥤ C
inst✝¹ : HasLimit F
E : K ⥤ J
inst✝ : HasLimit (E ⋙ F)
c : Cone F
j✝ : K
⊢ (lift F c ≫ pre F E) ≫ π (E ⋙ F) j✝ = lift (E ⋙ F) (Cone.whisker E c) ≫ π (E ⋙ F) j✝
Theorem: Multiset.noncommProd_map
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction s using Quotient.inductionOn
state_before: F : Type u_1
ι : Type ?u.95490
α : Type u_2
β : Type u_3
γ : Type ?u.95499
f✝ : α → β → β
op : α → α → α
inst✝² : Monoid α
inst✝¹ : Monoid β
inst✝ : MonoidHomClass F α β
s : Multiset α
comm : Set.Pairwise {x | x ∈ s} Commute
f : F
⊢ ↑f (noncommProd s comm) = noncommProd (map (↑f) s) (_ : Set.Pairwise {x | x ∈ map (↑f) s} Commute)

tactic: simpa using map_list_prod f _
state_before: case h
F : Type u_1
ι : Type ?u.95490
α : Type u_2
β : Type u_3
γ : Type ?u.95499
f✝ : α → β → β
op : α → α → α
inst✝² : Monoid α
inst✝¹ : Monoid β
inst✝ : MonoidHomClass F α β
f : F
a✝ : List α
comm : Set.Pairwise {x | x ∈ Quotient.mk (List.isSetoid α) a✝} Commute
⊢ ↑f (noncommProd (Quotient.mk (List.isSetoid α) a✝) comm) =
    noncommProd (map (↑f) (Quotient.mk (List.isSetoid α) a✝))
      (_ : Set.Pairwise {x | x ∈ map (↑f) (Quotient.mk (List.isSetoid α) a✝)} Commute)
Theorem: singleton_mul_ball
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp only [preimage_mul_ball, image_mul_left, singleton_mul, div_inv_eq_mul, mul_comm y x]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ {x} * ball y δ = ball (x * y) δ
Theorem: Stream'.get?_take
File: Mathlib/Data/Stream/Init.lean

tactic: rw [take_succ, List.get?, get?_take (Nat.lt_of_succ_lt_succ h), nth_succ]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
k n : ℕ
h : k + 1 < n + 1
⊢ List.get? (take (n + 1) s) (k + 1) = some (nth s (k + 1))
Theorem: Matrix.inv_zpow
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: rw [zpow_ofNat, zpow_ofNat, inv_pow']
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
⊢ A⁻¹ ^ ↑n = (A ^ ↑n)⁻¹

tactic: rw [zpow_negSucc, zpow_negSucc, inv_pow']
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
⊢ A⁻¹ ^ -[n+1] = (A ^ -[n+1])⁻¹
Theorem: divp_mul_cancel
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [Units.inv_mul, mul_one]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c a : α
u : αˣ
⊢ a * (↑u⁻¹ * ↑u) = a
Theorem: Polynomial.Monic.not_dvd_of_natDegree_lt
File: Mathlib/Data/Polynomial/Monic.lean

tactic: rintro ⟨r, rfl⟩
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
h0 : q ≠ 0
hl : natDegree q < natDegree p
⊢ ¬p ∣ q

tactic: rw [hp.natDegree_mul' <| right_ne_zero_of_mul h0] at hl
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p r✝ : R[X]
hp : Monic p
r : R[X]
h0 : p * r ≠ 0
hl : natDegree (p * r) < natDegree p
⊢ False

tactic: exact hl.not_le (Nat.le_add_right _ _)
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p r✝ : R[X]
hp : Monic p
r : R[X]
h0 : p * r ≠ 0
hl : natDegree p + natDegree r < natDegree p
⊢ False
Theorem: Turing.ListBlank.nth_zero
File: Mathlib/Computability/TuringMachine.lean

tactic: conv => lhs; rw [← ListBlank.cons_head_tail l]
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
⊢ nth l 0 = head l

tactic: exact Quotient.inductionOn' l.tail fun l ↦ rfl
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
⊢ nth (cons (head l) (tail l)) 0 = head l
Theorem: untrop_sum
File: Mathlib/Algebra/Tropical/BigOperators.lean

tactic: rw [iInf,← Set.image_univ,← coe_univ, untrop_sum_eq_sInf_image]
state_before: R : Type u_1
S : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder R
inst✝ : Fintype S
f : S → Tropical (WithTop R)
⊢ untrop (∑ i : S, f i) = ⨅ (i : S), untrop (f i)

tactic: rfl
state_before: R : Type u_1
S : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder R
inst✝ : Fintype S
f : S → Tropical (WithTop R)
⊢ sInf ((untrop ∘ fun i => f i) '' ↑univ) = sInf ((fun i => untrop (f i)) '' ↑univ)
Theorem: Submodule.finrank_add_eq_of_isCompl
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [← finrank_sup_add_finrank_inf_eq, h.codisjoint.eq_top, h.disjoint.eq_bot, finrank_bot,
  add_zero]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
U W : Submodule K V
h : IsCompl U W
⊢ finrank K { x // x ∈ U } + finrank K { x // x ∈ W } = finrank K V

tactic: exact finrank_top _ _
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
U W : Submodule K V
h : IsCompl U W
⊢ finrank K { x // x ∈ ⊤ } = finrank K V
Theorem: Finset.exists_max_image
File: Mathlib/Data/Finset/Lattice.lean

tactic: cases' max_of_nonempty (h.image f) with y hy
state_before: F : Type ?u.403056
α : Type u_2
β : Type u_1
γ : Type ?u.403065
ι : Type ?u.403068
κ : Type ?u.403071
inst✝ : LinearOrder α
s : Finset β
f : β → α
h : Finset.Nonempty s
⊢ ∃ x, x ∈ s ∧ ∀ (x' : β), x' ∈ s → f x' ≤ f x

tactic: rcases mem_image.mp (mem_of_max hy) with ⟨x, hx, rfl⟩
state_before: case intro
F : Type ?u.403056
α : Type u_2
β : Type u_1
γ : Type ?u.403065
ι : Type ?u.403068
κ : Type ?u.403071
inst✝ : LinearOrder α
s : Finset β
f : β → α
h : Finset.Nonempty s
y : α
hy : Finset.max (image f s) = ↑y
⊢ ∃ x, x ∈ s ∧ ∀ (x' : β), x' ∈ s → f x' ≤ f x

tactic: exact ⟨x, hx, fun x' hx' => le_max_of_eq (mem_image_of_mem f hx') hy⟩
state_before: case intro.intro.intro
F : Type ?u.403056
α : Type u_2
β : Type u_1
γ : Type ?u.403065
ι : Type ?u.403068
κ : Type ?u.403071
inst✝ : LinearOrder α
s : Finset β
f : β → α
h : Finset.Nonempty s
x : β
hx : x ∈ s
hy : Finset.max (image f s) = ↑(f x)
⊢ ∃ x, x ∈ s ∧ ∀ (x' : β), x' ∈ s → f x' ≤ f x
Theorem: CategoryTheory.Limits.imageSubobjectCompIso_inv_arrow
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: simp [imageSubobjectCompIso]
state_before: C : Type u
inst✝⁴ : Category C
X Y Z : C
f✝ : X ⟶ Y
inst✝³ : HasImage f✝
inst✝² : HasEqualizers C
f : X ⟶ Y
inst✝¹ : HasImage f
Y' : C
h : Y ⟶ Y'
inst✝ : IsIso h
⊢ (imageSubobjectCompIso f h).inv ≫ arrow (imageSubobject (f ≫ h)) = arrow (imageSubobject f) ≫ h
Theorem: Nat.Partrec.Code.evaln_map
File: Mathlib/Computability/PartrecCode.lean

tactic: by_cases kn : n < k
state_before: k : ℕ
c : Code
n : ℕ
⊢ (Option.bind (Option.map (evaln k c) (List.get? (List.range k) n)) fun b => b) = evaln k c n

tactic: simp [List.get?_range kn]
state_before: case pos
k : ℕ
c : Code
n : ℕ
kn : n < k
⊢ (Option.bind (Option.map (evaln k c) (List.get? (List.range k) n)) fun b => b) = evaln k c n

tactic: rw [List.get?_len_le]
state_before: case neg
k : ℕ
c : Code
n : ℕ
kn : ¬n < k
⊢ (Option.bind (Option.map (evaln k c) (List.get? (List.range k) n)) fun b => b) = evaln k c n

tactic: simpa using kn
state_before: case neg
k : ℕ
c : Code
n : ℕ
kn : ¬n < k
⊢ List.length (List.range k) ≤ n

tactic: cases e : evaln k c n
state_before: case neg
k : ℕ
c : Code
n : ℕ
kn : ¬n < k
⊢ (Option.bind (Option.map (evaln k c) Option.none) fun b => b) = evaln k c n

tactic: exact kn.elim (evaln_bound e)
state_before: case neg.some
k : ℕ
c : Code
n : ℕ
kn : ¬n < k
val✝ : ℕ
e : evaln k c n = some val✝
⊢ (Option.bind (Option.map (evaln k c) Option.none) fun b => b) = some val✝

tactic: rfl
state_before: case neg.none
k : ℕ
c : Code
n : ℕ
kn : ¬n < k
e : evaln k c n = Option.none
⊢ (Option.bind (Option.map (evaln k c) Option.none) fun b => b) = Option.none
Theorem: Option.ne_none_iff_exists
File: Std/Data/Option/Lemmas.lean

tactic: cases o <;> simp
state_before: α✝ : Type u_1
o : Option α✝
⊢ o ≠ none ↔ ∃ x, some x = o
Theorem: nilpotencyClass_le_of_surjective
File: Mathlib/GroupTheory/Nilpotent.lean

tactic: refine @Nat.find_mono _ _ (Classical.decPred _) (Classical.decPred _) ?_ _ _
state_before: G : Type u_2
inst✝² : Group G
H : Subgroup G
inst✝¹ : Normal H
G' : Type u_1
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
h : Group.IsNilpotent G
⊢ nilpotencyClass G' ≤ nilpotencyClass G

tactic: intro n hn
state_before: G : Type u_2
inst✝² : Group G
H : Subgroup G
inst✝¹ : Normal H
G' : Type u_1
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
h : Group.IsNilpotent G
⊢ ∀ (n : ℕ), upperCentralSeries G n = ⊤ → upperCentralSeries G' n = ⊤

tactic: apply eq_top_iff.mpr
state_before: G : Type u_2
inst✝² : Group G
H : Subgroup G
inst✝¹ : Normal H
G' : Type u_1
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
h : Group.IsNilpotent G
n : ℕ
hn : upperCentralSeries G n = ⊤
⊢ upperCentralSeries G' n = ⊤

tactic: calc
  ⊤ = f.range := symm (f.range_top_of_surjective hf)
  _ = Subgroup.map f ⊤ := (MonoidHom.range_eq_map _)
  _ = Subgroup.map f (upperCentralSeries G n) := by rw [hn]
  _ ≤ upperCentralSeries G' n := upperCentralSeries.map hf n
state_before: G : Type u_2
inst✝² : Group G
H : Subgroup G
inst✝¹ : Normal H
G' : Type u_1
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
h : Group.IsNilpotent G
n : ℕ
hn : upperCentralSeries G n = ⊤
⊢ ⊤ ≤ upperCentralSeries G' n

tactic: rw [hn]
state_before: G : Type u_2
inst✝² : Group G
H : Subgroup G
inst✝¹ : Normal H
G' : Type u_1
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
h : Group.IsNilpotent G
n : ℕ
hn : upperCentralSeries G n = ⊤
⊢ Subgroup.map f ⊤ = Subgroup.map f (upperCentralSeries G n)
Theorem: Dfinsupp.mapRange_neLocus_eq
File: Mathlib/Data/Dfinsupp/NeLocus.lean

tactic: ext a
state_before: α : Type u_3
N : α → Type u_1
inst✝⁵ : DecidableEq α
M : α → Type u_2
P : α → Type ?u.19293
inst✝⁴ : (a : α) → Zero (N a)
inst✝³ : (a : α) → Zero (M a)
inst✝² : (a : α) → Zero (P a)
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → DecidableEq (M a)
f g : Π₀ (a : α), N a
F : (a : α) → N a → M a
F0 : ∀ (a : α), F a 0 = 0
hF : ∀ (a : α), Function.Injective (F a)
⊢ neLocus (mapRange F F0 f) (mapRange F F0 g) = neLocus f g

tactic: simpa only [mem_neLocus] using (hF a).ne_iff
state_before: case a
α : Type u_3
N : α → Type u_1
inst✝⁵ : DecidableEq α
M : α → Type u_2
P : α → Type ?u.19293
inst✝⁴ : (a : α) → Zero (N a)
inst✝³ : (a : α) → Zero (M a)
inst✝² : (a : α) → Zero (P a)
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → DecidableEq (M a)
f g : Π₀ (a : α), N a
F : (a : α) → N a → M a
F0 : ∀ (a : α), F a 0 = 0
hF : ∀ (a : α), Function.Injective (F a)
a : α
⊢ a ∈ neLocus (mapRange F F0 f) (mapRange F F0 g) ↔ a ∈ neLocus f g
Theorem: Nat.mod_self
File: src/lean/Init/Data/Nat/Div.lean

tactic: rw [mod_eq_sub_mod (Nat.le_refl _), Nat.sub_self, zero_mod]
state_before: n : Nat
⊢ n % n = 0
Theorem: AddMonoidHom.apply_nat
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: rw [← multiplesHom_symm_apply, ← multiplesHom_apply, Equiv.apply_symm_apply]
state_before: α : Type ?u.351388
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : AddMonoid M
f : ℕ →+ M
n : ℕ
⊢ ↑f n = n • ↑f 1
Theorem: IsLUB.nonempty
File: Mathlib/Order/Bounds/Basic.lean

tactic: rw [h, upperBounds_empty]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s t : Set α
a b : α
inst✝ : NoMinOrder α
hs : IsLUB s a
a' : α
ha' : a' < a
h : s = ∅
⊢ a' ∈ upperBounds s

tactic: exact mem_univ _
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s t : Set α
a b : α
inst✝ : NoMinOrder α
hs : IsLUB s a
a' : α
ha' : a' < a
h : s = ∅
⊢ a' ∈ univ
Theorem: Int.mod_eq_of_lt
File: Std/Data/Int/DivMod.lean

tactic: rw [mod_eq_emod H1 (Int.le_trans H1 (Int.le_of_lt H2)), emod_eq_of_lt H1 H2]
state_before: a b : Int
H1 : 0 ≤ a
H2 : a < b
⊢ mod a b = a
Theorem: NNReal.tsum_mul_right
File: Mathlib/Topology/Instances/NNReal.lean

tactic: simp only [coe_tsum, NNReal.coe_mul, tsum_mul_right]
state_before: α : Type u_1
f : α → ℝ≥0
a : ℝ≥0
⊢ ↑(∑' (x : α), f x * a) = ↑((∑' (x : α), f x) * a)
Theorem: LowerSet.coe_eq_univ
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp [SetLike.ext'_iff]
state_before: α : Type u_1
β : Type ?u.66405
γ : Type ?u.66408
ι : Sort ?u.66411
κ : ι → Sort ?u.66416
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
⊢ ↑s = univ ↔ s = ⊤
Theorem: one_le_div_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [le_div_iff_of_neg hb, one_mul]
state_before: ι : Type ?u.154118
α : Type u_1
β : Type ?u.154124
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hb : b < 0
⊢ 1 ≤ a / b ↔ a ≤ b
Theorem: QuadraticForm.polar_smul_right
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: rw [polar_comm Q x, polar_comm Q x, polar_smul_left]
state_before: S : Type ?u.165922
R : Type u_1
R₁ : Type ?u.165928
M : Type u_2
inst✝³ : Ring R
inst✝² : CommRing R₁
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
a : R
x y : M
⊢ polar (↑Q) x (a • y) = a * polar (↑Q) x y
Theorem: Nat.Primrec'.unpair₁
File: Mathlib/Computability/Primrec.lean

tactic: have s := sqrt.comp₁ _ hf
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
⊢ Primrec' fun v => (unpair (f v)).fst

tactic: have fss := sub.comp₂ _ hf (mul.comp₂ _ s s)
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
s : Primrec' fun v => Nat.sqrt (f v)
⊢ Primrec' fun v => (unpair (f v)).fst

tactic: refine' (if_lt fss s fss s).of_eq fun v => _
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
s : Primrec' fun v => Nat.sqrt (f v)
fss : Primrec' fun v => f v - Nat.sqrt (f v) * Nat.sqrt (f v)
⊢ Primrec' fun v => (unpair (f v)).fst

tactic: simp [Nat.unpair]
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
s : Primrec' fun v => Nat.sqrt (f v)
fss : Primrec' fun v => f v - Nat.sqrt (f v) * Nat.sqrt (f v)
v : Vector ℕ n
⊢ (if f v - Nat.sqrt (f v) * Nat.sqrt (f v) < Nat.sqrt (f v) then f v - Nat.sqrt (f v) * Nat.sqrt (f v)
    else Nat.sqrt (f v)) =
    (unpair (f v)).fst

tactic: split_ifs <;> rfl
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
s : Primrec' fun v => Nat.sqrt (f v)
fss : Primrec' fun v => f v - Nat.sqrt (f v) * Nat.sqrt (f v)
v : Vector ℕ n
⊢ (if f v - Nat.sqrt (f v) * Nat.sqrt (f v) < Nat.sqrt (f v) then f v - Nat.sqrt (f v) * Nat.sqrt (f v)
    else Nat.sqrt (f v)) =
    (if f v - Nat.sqrt (f v) * Nat.sqrt (f v) < Nat.sqrt (f v) then
        (f v - Nat.sqrt (f v) * Nat.sqrt (f v), Nat.sqrt (f v))
      else (Nat.sqrt (f v), f v - Nat.sqrt (f v) * Nat.sqrt (f v) - Nat.sqrt (f v))).fst
Theorem: Complex.cosh_mul_I
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← mul_right_inj' (two_ne_zero' ℂ), two_cosh, two_cos, neg_mul_eq_neg_mul]
state_before: x y : ℂ
⊢ cosh (x * I) = cos x
Theorem: LinearEquiv.ofSubmodule'_toLinearMap
File: Mathlib/LinearAlgebra/Basic.lean

tactic: ext
state_before: R : Type u_1
R₁ : Type ?u.1872963
R₂ : Type u_3
R₃ : Type ?u.1872969
R₄ : Type ?u.1872972
S : Type ?u.1872975
K : Type ?u.1872978
K₂ : Type ?u.1872981
M : Type u_2
M' : Type ?u.1872987
M₁ : Type ?u.1872990
M₂ : Type u_4
M₃ : Type ?u.1872996
M₄ : Type ?u.1872999
N : Type ?u.1873002
N₂ : Type ?u.1873005
ι : Type ?u.1873008
V : Type ?u.1873011
V₂ : Type ?u.1873014
inst✝¹⁰ : Semiring R
inst✝⁹ : Semiring R₂
inst✝⁸ : Semiring R₃
inst✝⁷ : Semiring R₄
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : AddCommMonoid M₃
inst✝³ : AddCommMonoid M₄
module_M : Module R M
module_M₂ : Module R₂ M₂
module_M₃ : Module R₃ M₃
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
σ₃₂ : R₃ →+* R₂
re₁₂ : RingHomInvPair σ₁₂ σ₂₁
re₂₁ : RingHomInvPair σ₂₁ σ₁₂
re₂₃ : RingHomInvPair σ₂₃ σ₃₂
re₃₂ : RingHomInvPair σ₃₂ σ₂₃
f✝ : M →ₛₗ[σ₁₂] M₂
g : M₂ →ₛₗ[σ₂₁] M
e : M ≃ₛₗ[σ₁₂] M₂
h : M₂ →ₛₗ[σ₂₃] M₃
e'' : M₂ ≃ₛₗ[σ₂₃] M₃
p q : Submodule R M
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
f : M ≃ₛₗ[σ₁₂] M₂
U : Submodule R₂ M₂
⊢ ↑(ofSubmodule' f U) =
    LinearMap.codRestrict U (LinearMap.domRestrict (↑f) (Submodule.comap (↑f) U))
      (_ : ∀ (x : { x // x ∈ Submodule.comap (↑f) U }), ↑x ∈ Submodule.comap (↑f) U)

tactic: rfl
state_before: case h.a
R : Type u_1
R₁ : Type ?u.1872963
R₂ : Type u_3
R₃ : Type ?u.1872969
R₄ : Type ?u.1872972
S : Type ?u.1872975
K : Type ?u.1872978
K₂ : Type ?u.1872981
M : Type u_2
M' : Type ?u.1872987
M₁ : Type ?u.1872990
M₂ : Type u_4
M₃ : Type ?u.1872996
M₄ : Type ?u.1872999
N : Type ?u.1873002
N₂ : Type ?u.1873005
ι : Type ?u.1873008
V : Type ?u.1873011
V₂ : Type ?u.1873014
inst✝¹⁰ : Semiring R
inst✝⁹ : Semiring R₂
inst✝⁸ : Semiring R₃
inst✝⁷ : Semiring R₄
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : AddCommMonoid M₃
inst✝³ : AddCommMonoid M₄
module_M : Module R M
module_M₂ : Module R₂ M₂
module_M₃ : Module R₃ M₃
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
σ₃₂ : R₃ →+* R₂
re₁₂ : RingHomInvPair σ₁₂ σ₂₁
re₂₁ : RingHomInvPair σ₂₁ σ₁₂
re₂₃ : RingHomInvPair σ₂₃ σ₃₂
re₃₂ : RingHomInvPair σ₃₂ σ₂₃
f✝ : M →ₛₗ[σ₁₂] M₂
g : M₂ →ₛₗ[σ₂₁] M
e : M ≃ₛₗ[σ₁₂] M₂
h : M₂ →ₛₗ[σ₂₃] M₃
e'' : M₂ ≃ₛₗ[σ₂₃] M₃
p q : Submodule R M
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
f : M ≃ₛₗ[σ₁₂] M₂
U : Submodule R₂ M₂
x✝ : { x // x ∈ Submodule.comap (↑f) U }
⊢ ↑(↑↑(ofSubmodule' f U) x✝) =
    ↑(↑(LinearMap.codRestrict U (LinearMap.domRestrict (↑f) (Submodule.comap (↑f) U))
            (_ : ∀ (x : { x // x ∈ Submodule.comap (↑f) U }), ↑x ∈ Submodule.comap (↑f) U))
        x✝)
Theorem: RatFunc.coe_X
File: Mathlib/FieldTheory/RatFunc.lean

tactic: rw [coe_num_denom, num_X, denom_X, Polynomial.coe_X, Polynomial.coe_one,
   PowerSeries.coe_one, div_one]
state_before: K F : Type u
inst✝ : Field F
p q : F[X]
f g : RatFunc F
⊢ ↑X = ↑(single 1) 1

tactic: simp only [ofPowerSeries_X]
state_before: K F : Type u
inst✝ : Field F
p q : F[X]
f g : RatFunc F
⊢ ↑(ofPowerSeries ℤ F) PowerSeries.X = ↑(single 1) 1
Theorem: List.chain_append_cons_cons
File: Mathlib/Data/List/Chain.lean

tactic: rw [chain_split, chain_cons]
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁✝ l₂✝ : List α
a✝ b✝ a b c : α
l₁ l₂ : List α
⊢ Chain R a (l₁ ++ b :: c :: l₂) ↔ Chain R a (l₁ ++ [b]) ∧ R b c ∧ Chain R c l₂
Theorem: Prod.snd_natCast
File: Mathlib/Data/Nat/Cast/Prod.lean

tactic: induction n <;> simp [*]
state_before: α : Type u_2
β : Type u_1
inst✝¹ : AddMonoidWithOne α
inst✝ : AddMonoidWithOne β
n : ℕ
⊢ (↑n).snd = ↑n
Theorem: Finsupp.graph_injective
File: Mathlib/Data/Finsupp/Basic.lean

tactic: intro f g h
state_before: α✝ : Type ?u.4285
β : Type ?u.4288
γ : Type ?u.4291
ι : Type ?u.4294
M✝ : Type ?u.4297
M' : Type ?u.4300
N : Type ?u.4303
P : Type ?u.4306
G : Type ?u.4309
H : Type ?u.4312
R : Type ?u.4315
S : Type ?u.4318
inst✝¹ : Zero M✝
α : Type u_1
M : Type u_2
inst✝ : Zero M
⊢ Injective graph

tactic: classical
  have hsup : f.support = g.support := by rw [← image_fst_graph, h, image_fst_graph]
  refine' ext_iff'.2 ⟨hsup, fun x hx => apply_eq_of_mem_graph <| h.symm ▸ _⟩
  exact mk_mem_graph _ (hsup ▸ hx)
state_before: α✝ : Type ?u.4285
β : Type ?u.4288
γ : Type ?u.4291
ι : Type ?u.4294
M✝ : Type ?u.4297
M' : Type ?u.4300
N : Type ?u.4303
P : Type ?u.4306
G : Type ?u.4309
H : Type ?u.4312
R : Type ?u.4315
S : Type ?u.4318
inst✝¹ : Zero M✝
α : Type u_1
M : Type u_2
inst✝ : Zero M
f g : α →₀ M
h : graph f = graph g
⊢ f = g

tactic: have hsup : f.support = g.support := by rw [← image_fst_graph, h, image_fst_graph]
state_before: α✝ : Type ?u.4285
β : Type ?u.4288
γ : Type ?u.4291
ι : Type ?u.4294
M✝ : Type ?u.4297
M' : Type ?u.4300
N : Type ?u.4303
P : Type ?u.4306
G : Type ?u.4309
H : Type ?u.4312
R : Type ?u.4315
S : Type ?u.4318
inst✝¹ : Zero M✝
α : Type u_1
M : Type u_2
inst✝ : Zero M
f g : α →₀ M
h : graph f = graph g
⊢ f = g

tactic: refine' ext_iff'.2 ⟨hsup, fun x hx => apply_eq_of_mem_graph <| h.symm ▸ _⟩
state_before: α✝ : Type ?u.4285
β : Type ?u.4288
γ : Type ?u.4291
ι : Type ?u.4294
M✝ : Type ?u.4297
M' : Type ?u.4300
N : Type ?u.4303
P : Type ?u.4306
G : Type ?u.4309
H : Type ?u.4312
R : Type ?u.4315
S : Type ?u.4318
inst✝¹ : Zero M✝
α : Type u_1
M : Type u_2
inst✝ : Zero M
f g : α →₀ M
h : graph f = graph g
hsup : f.support = g.support
⊢ f = g

tactic: exact mk_mem_graph _ (hsup ▸ hx)
state_before: α✝ : Type ?u.4285
β : Type ?u.4288
γ : Type ?u.4291
ι : Type ?u.4294
M✝ : Type ?u.4297
M' : Type ?u.4300
N : Type ?u.4303
P : Type ?u.4306
G : Type ?u.4309
H : Type ?u.4312
R : Type ?u.4315
S : Type ?u.4318
inst✝¹ : Zero M✝
α : Type u_1
M : Type u_2
inst✝ : Zero M
f g : α →₀ M
h : graph f = graph g
hsup : f.support = g.support
x : α
hx : x ∈ f.support
⊢ (x, ↑g x) ∈ graph g

tactic: rw [← image_fst_graph, h, image_fst_graph]
state_before: α✝ : Type ?u.4285
β : Type ?u.4288
γ : Type ?u.4291
ι : Type ?u.4294
M✝ : Type ?u.4297
M' : Type ?u.4300
N : Type ?u.4303
P : Type ?u.4306
G : Type ?u.4309
H : Type ?u.4312
R : Type ?u.4315
S : Type ?u.4318
inst✝¹ : Zero M✝
α : Type u_1
M : Type u_2
inst✝ : Zero M
f g : α →₀ M
h : graph f = graph g
⊢ f.support = g.support