1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MvPolynomial.totalDegree_add_eq_right_of_totalDegree_lt
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

tactic: rw [add_comm, totalDegree_add_eq_left_of_totalDegree_lt h]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
h : q.totalDegree < p.totalDegree
⊢ (q + p).totalDegree = p.totalDegree
state_after: no goals
Theorem: Polynomial.degree_monomial_le
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [h, (monomial n).map_zero, degree_zero]
state_before: R : Type u
S : Type v
a✝ b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
a : R
this : DecidableEq R := Classical.decEq R
h : a = 0
⊢ ((monomial n) a).degree ≤ ↑n
state_after: R : Type u
S : Type v
a✝ b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
a : R
this : DecidableEq R := Classical.decEq R
h : a = 0
⊢ ⊥ ≤ ↑n

tactic: exact bot_le
state_before: R : Type u
S : Type v
a✝ b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
a : R
this : DecidableEq R := Classical.decEq R
h : a = 0
⊢ ⊥ ≤ ↑n
state_after: no goals
Theorem: HasDerivAtFilter.const_smul
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: simpa using (hf.const_smul c).hasDerivAtFilter
state_before: 𝕜 : Type u
inst✝¹⁰ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
E : Type w
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
G : Type u_1
inst✝⁵ : NormedAddCommGroup G
inst✝⁴ : NormedSpace 𝕜 G
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_2
inst✝³ : Semiring R
inst✝² : Module R F
inst✝¹ : SMulCommClass 𝕜 R F
inst✝ : ContinuousConstSMul R F
c : R
hf : HasDerivAtFilter f f' x L
⊢ HasDerivAtFilter (fun y => c • f y) (c • f') x L
state_after: no goals
Theorem: Turing.eval_maximal₁
File: Mathlib/Computability/TuringMachine.lean

tactic: let ⟨_, b0⟩ := mem_eval.1 h
state_before: σ : Type u_1
f : σ → Option σ
a b : σ
h : b ∈ eval f a
c : σ
x✝ : Reaches₁ f b c
bc : Reaches₁ f b c := x✝
⊢ False
state_after: σ : Type u_1
f : σ → Option σ
a b : σ
h : b ∈ eval f a
c : σ
x✝ : Reaches₁ f b c
bc : Reaches₁ f b c := x✝
left✝ : Reaches f a b
b0 : f b = none
⊢ False

tactic: let ⟨b', h', _⟩ := TransGen.head'_iff.1 bc
state_before: σ : Type u_1
f : σ → Option σ
a b : σ
h : b ∈ eval f a
c : σ
x✝ : Reaches₁ f b c
bc : Reaches₁ f b c := x✝
left✝ : Reaches f a b
b0 : f b = none
⊢ False
state_after: σ : Type u_1
f : σ → Option σ
a b : σ
h : b ∈ eval f a
c : σ
x✝ : Reaches₁ f b c
bc : Reaches₁ f b c := x✝
left✝ : Reaches f a b
b0 : f b = none
b' : σ
h' : b' ∈ f b
right✝ : ReflTransGen (fun a b => b ∈ f a) b' c
⊢ False

tactic: cases b0.symm.trans h'
state_before: σ : Type u_1
f : σ → Option σ
a b : σ
h : b ∈ eval f a
c : σ
x✝ : Reaches₁ f b c
bc : Reaches₁ f b c := x✝
left✝ : Reaches f a b
b0 : f b = none
b' : σ
h' : b' ∈ f b
right✝ : ReflTransGen (fun a b => b ∈ f a) b' c
⊢ False
state_after: no goals
Theorem: ZMod.eq_zero_iff_gcd_ne_one
File: Mathlib/Data/ZMod/Coprime.lean

tactic: rw [Ne, Int.gcd_comm, Int.gcd_eq_one_iff_coprime,
  (Nat.prime_iff_prime_int.1 pp.1).coprime_iff_not_dvd, Classical.not_not,
  intCast_zmod_eq_zero_iff_dvd]
state_before: a : ℤ
p : ℕ
pp : Fact (Nat.Prime p)
⊢ ↑a = 0 ↔ a.gcd ↑p ≠ 1
state_after: no goals
Theorem: Multiset.bind_assoc
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a : α
s✝ t : Multiset α
f✝ g✝ : α → Multiset β
s : Multiset α
f : α → Multiset β
g : β → Multiset γ
⊢ (bind 0 f).bind g = bind 0 fun a => (f a).bind g
state_after: no goals

tactic: simp (config := { contextual := true })
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a : α
s✝ t : Multiset α
f✝ g✝ : α → Multiset β
s : Multiset α
f : α → Multiset β
g : β → Multiset γ
⊢ ∀ (a : α) (s : Multiset α),
    ((s.bind f).bind g = s.bind fun a => (f a).bind g) →
      ((a ::ₘ s).bind f).bind g = (a ::ₘ s).bind fun a => (f a).bind g
state_after: no goals
Theorem: Subgroup.IsComplement'.isCompl
File: Mathlib/GroupTheory/Complement.lean

tactic: refine
  ⟨disjoint_iff_inf_le.mpr fun g ⟨p, q⟩ =>
      let x : H × K := ⟨⟨g, p⟩, 1⟩
      let y : H × K := ⟨1, g, q⟩
      Subtype.ext_iff.mp
        (Prod.ext_iff.mp (show x = y from h.1 ((mul_one g).trans (one_mul g).symm))).1,
    codisjoint_iff_le_sup.mpr fun g _ => ?_⟩
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
⊢ IsCompl H K
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
g : G
x✝ : g ∈ ⊤
⊢ g ∈ H ⊔ K

tactic: obtain ⟨⟨h, k⟩, rfl⟩ := h.2 g
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
g : G
x✝ : g ∈ ⊤
⊢ g ∈ H ⊔ K
state_after: case intro.mk
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h✝ : H.IsComplement' K
h : ↑↑H
k : ↑↑K
x✝ : (fun x => ↑x.1 * ↑x.2) (h, k) ∈ ⊤
⊢ (fun x => ↑x.1 * ↑x.2) (h, k) ∈ H ⊔ K

tactic: exact Subgroup.mul_mem_sup h.2 k.2
state_before: case intro.mk
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h✝ : H.IsComplement' K
h : ↑↑H
k : ↑↑K
x✝ : (fun x => ↑x.1 * ↑x.2) (h, k) ∈ ⊤
⊢ (fun x => ↑x.1 * ↑x.2) (h, k) ∈ H ⊔ K
state_after: no goals
Theorem: Set.Ioc_diff_Iic
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: rw [diff_eq, compl_Iic, Ioc_inter_Ioi, sup_eq_max]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
a a₁ a₂ b b₁ b₂ c d : α
⊢ Ioc a b \ Iic c = Ioc (max a c) b
state_after: no goals
Theorem: disjoint_symmDiff_inf
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff_eq_sup_sdiff_inf]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ Disjoint (a ∆ b) (a ⊓ b)
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ Disjoint ((a ⊔ b) \ (a ⊓ b)) (a ⊓ b)

tactic: exact disjoint_sdiff_self_left
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ Disjoint ((a ⊔ b) \ (a ⊓ b)) (a ⊓ b)
state_after: no goals
Theorem: GeneralizedContinuedFraction.IntFractPair.stream_succ_of_int
File: Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

tactic: induction' n with n ih
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
a : ℤ
n : ℕ
⊢ IntFractPair.stream (↑a) (n + 1) = none
state_after: case zero
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a : ℤ
⊢ IntFractPair.stream (↑a) (0 + 1) = none

case succ
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
a : ℤ
n : ℕ
ih : IntFractPair.stream (↑a) (n + 1) = none
⊢ IntFractPair.stream (↑a) (n + 1 + 1) = none

tactic: refine IntFractPair.stream_eq_none_of_fr_eq_zero (IntFractPair.stream_zero (a : K)) ?_
state_before: case zero
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a : ℤ
⊢ IntFractPair.stream (↑a) (0 + 1) = none
state_after: case zero
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a : ℤ
⊢ (IntFractPair.of ↑a).fr = 0

tactic: simp only [IntFractPair.of, Int.fract_intCast]
state_before: case zero
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a : ℤ
⊢ (IntFractPair.of ↑a).fr = 0
state_after: no goals

tactic: exact IntFractPair.succ_nth_stream_eq_none_iff.mpr (Or.inl ih)
state_before: case succ
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
a : ℤ
n : ℕ
ih : IntFractPair.stream (↑a) (n + 1) = none
⊢ IntFractPair.stream (↑a) (n + 1 + 1) = none
state_after: no goals
Theorem: Nat.Prime.factorization
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: ext q
state_before: a b m n p✝ p : ℕ
hp : Prime p
⊢ p.factorization = single p 1
state_after: case h
a b m n p✝ p : ℕ
hp : Prime p
q : ℕ
⊢ p.factorization q = (single p 1) q

tactic: rw [← factors_count_eq, factors_prime hp, single_apply, count_singleton', if_congr eq_comm] <;>
  rfl
state_before: case h
a b m n p✝ p : ℕ
hp : Prime p
q : ℕ
⊢ p.factorization q = (single p 1) q
state_after: no goals
Theorem: Nat.mul_mem_factoredNumbers
File: Mathlib/NumberTheory/SmoothNumbers.lean

tactic: have hm' := primeFactors_subset_of_mem_factoredNumbers hm
state_before: s : Finset ℕ
m n : ℕ
hm : m ∈ factoredNumbers s
hn : n ∈ factoredNumbers s
⊢ m * n ∈ factoredNumbers s
state_after: s : Finset ℕ
m n : ℕ
hm : m ∈ factoredNumbers s
hn : n ∈ factoredNumbers s
hm' : m.primeFactors ⊆ s
⊢ m * n ∈ factoredNumbers s

tactic: have hn' := primeFactors_subset_of_mem_factoredNumbers hn
state_before: s : Finset ℕ
m n : ℕ
hm : m ∈ factoredNumbers s
hn : n ∈ factoredNumbers s
hm' : m.primeFactors ⊆ s
⊢ m * n ∈ factoredNumbers s
state_after: s : Finset ℕ
m n : ℕ
hm : m ∈ factoredNumbers s
hn : n ∈ factoredNumbers s
hm' : m.primeFactors ⊆ s
hn' : n.primeFactors ⊆ s
⊢ m * n ∈ factoredNumbers s

tactic: exact mem_factoredNumbers_of_primeFactors_subset (mul_ne_zero hm.1 hn.1)
  <| primeFactors_mul hm.1 hn.1 ▸ Finset.union_subset hm' hn'
state_before: s : Finset ℕ
m n : ℕ
hm : m ∈ factoredNumbers s
hn : n ∈ factoredNumbers s
hm' : m.primeFactors ⊆ s
hn' : n.primeFactors ⊆ s
⊢ m * n ∈ factoredNumbers s
state_after: no goals
Theorem: Finsupp.card_Ioc
File: Mathlib/Data/Finsupp/Interval.lean

tactic: rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : Zero α
inst✝ : LocallyFiniteOrder α
f g : ι →₀ α
⊢ (Ioc f g).card = ∏ i ∈ f.support ∪ g.support, (Icc (f i) (g i)).card - 1
state_after: no goals
Theorem: hasMellin_cpow_Ioc
File: Mathlib/Analysis/MellinTransform.lean

tactic: have := hasMellin_one_Ioc (by rwa [add_re] : 0 < (s + a).re)
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
a s : ℂ
hs : 0 < s.re + a.re
⊢ HasMellin ((Ioc 0 1).indicator fun t => ↑t ^ a) s (1 / (s + a))
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
a s : ℂ
hs : 0 < s.re + a.re
this : HasMellin ((Ioc 0 1).indicator fun x => 1) (s + a) (1 / (s + a))
⊢ HasMellin ((Ioc 0 1).indicator fun t => ↑t ^ a) s (1 / (s + a))

tactic: simp_rw [HasMellin, ← MellinConvergent.cpow_smul, ← mellin_cpow_smul, ← indicator_smul,
  smul_eq_mul, mul_one] at this
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
a s : ℂ
hs : 0 < s.re + a.re
this : HasMellin ((Ioc 0 1).indicator fun x => 1) (s + a) (1 / (s + a))
⊢ HasMellin ((Ioc 0 1).indicator fun t => ↑t ^ a) s (1 / (s + a))
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
a s : ℂ
hs : 0 < s.re + a.re
this :
  MellinConvergent ((Ioc 0 1).indicator fun a_1 => ↑a_1 ^ a) s ∧
    mellin ((Ioc 0 1).indicator fun a_1 => ↑a_1 ^ a) s = 1 / (s + a)
⊢ HasMellin ((Ioc 0 1).indicator fun t => ↑t ^ a) s (1 / (s + a))

tactic: exact this
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
a s : ℂ
hs : 0 < s.re + a.re
this :
  MellinConvergent ((Ioc 0 1).indicator fun a_1 => ↑a_1 ^ a) s ∧
    mellin ((Ioc 0 1).indicator fun a_1 => ↑a_1 ^ a) s = 1 / (s + a)
⊢ HasMellin ((Ioc 0 1).indicator fun t => ↑t ^ a) s (1 / (s + a))
state_after: no goals

tactic: rwa [add_re]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
a s : ℂ
hs : 0 < s.re + a.re
⊢ 0 < (s + a).re
state_after: no goals
Theorem: Path.truncate_one_one
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: rw [min_self, γ.extend_one]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ : Path x y
a b : X
γ : Path a b
⊢ γ.extend (min 1 1) = b
state_after: no goals

tactic: convert γ.truncate_self 1
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ : Path x y
a b : X
γ : Path a b
⊢ γ.truncate 1 1 = (refl b).cast ⋯ ⋯
state_after: no goals
Theorem: LinearMap.mulRight_one
File: Mathlib/Algebra/Algebra/Bilinear.lean

tactic: ext
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
⊢ mulRight R 1 = id
state_after: case h
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
x✝ : A
⊢ (mulRight R 1) x✝ = id x✝

tactic: simp
state_before: case h
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
x✝ : A
⊢ (mulRight R 1) x✝ = id x✝
state_after: no goals
Theorem: SimpleGraph.Walk.length_darts
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> simp [*]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : G.Walk u v
⊢ p.darts.length = p.length
state_after: no goals
Theorem: AffineSubspace.sSameSide_vadd_left_iff
File: Mathlib/Analysis/Convex/Side.lean

tactic: rw [SSameSide, SSameSide, wSameSide_vadd_left_iff hv, vadd_mem_iff_mem_of_mem_direction hv]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : StrictOrderedCommRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y : P
v : V
hv : v ∈ s.direction
⊢ s.SSameSide (v +ᵥ x) y ↔ s.SSameSide x y
state_after: no goals
Theorem: Flow.continuous_toFun
File: Mathlib/Dynamics/Flow.lean

tactic: rw [← curry_uncurry ϕ.toFun]
state_before: τ : Type u_1
inst✝³ : AddCommGroup τ
inst✝² : TopologicalSpace τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
ϕ : Flow τ α
t : τ
⊢ Continuous (ϕ.toFun t)
state_after: τ : Type u_1
inst✝³ : AddCommGroup τ
inst✝² : TopologicalSpace τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
ϕ : Flow τ α
t : τ
⊢ Continuous (Function.curry (uncurry ϕ.toFun) t)

tactic: apply continuous_curry
state_before: τ : Type u_1
inst✝³ : AddCommGroup τ
inst✝² : TopologicalSpace τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
ϕ : Flow τ α
t : τ
⊢ Continuous (Function.curry (uncurry ϕ.toFun) t)
state_after: case h
τ : Type u_1
inst✝³ : AddCommGroup τ
inst✝² : TopologicalSpace τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
ϕ : Flow τ α
t : τ
⊢ Continuous (uncurry ϕ.toFun)

tactic: exact ϕ.cont'
state_before: case h
τ : Type u_1
inst✝³ : AddCommGroup τ
inst✝² : TopologicalSpace τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
ϕ : Flow τ α
t : τ
⊢ Continuous (uncurry ϕ.toFun)
state_after: no goals
Theorem: Affine.Simplex.reindex_range_points
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: rw [reindex, Set.range_comp, Equiv.range_eq_univ, Set.image_univ]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
m n : ℕ
s : Simplex k P m
e : Fin (m + 1) ≃ Fin (n + 1)
⊢ Set.range (s.reindex e).points = Set.range s.points
state_after: no goals
Theorem: Finset.shatterer_idem
File: Mathlib/Combinatorics/SetFamily/Shatter.lean

tactic: simp
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
⊢ 𝒜.shatterer.shatterer = 𝒜.shatterer
state_after: no goals
Theorem: Orientation.sin_oangle_add_left_mul_norm_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: rw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle (x + y) y).sin * ‖x + y‖ = ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (x + y)).sin * ‖x + y‖ = ‖x‖

tactic: rw [add_comm]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (x + y)).sin * ‖x + y‖ = ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (y + x)).sin * ‖y + x‖ = ‖x‖

tactic: exact (-o).sin_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (y + x)).sin * ‖y + x‖ = ‖x‖
state_after: no goals
Theorem: LinearMap.trace_comp_cycle
File: Mathlib/LinearAlgebra/Trace.lean

tactic: rw [trace_comp_comm', comp_assoc]
state_before: R : Type u_1
inst✝¹² : CommRing R
M : Type u_2
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
N : Type u_3
P : Type u_4
inst✝⁹ : AddCommGroup N
inst✝⁸ : Module R N
inst✝⁷ : AddCommGroup P
inst✝⁶ : Module R P
ι : Type u_5
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Finite R M
inst✝³ : Module.Free R N
inst✝² : Module.Finite R N
inst✝¹ : Module.Free R P
inst✝ : Module.Finite R P
f : M →ₗ[R] N
g : N →ₗ[R] P
h : P →ₗ[R] M
⊢ (trace R P) (g ∘ₗ f ∘ₗ h) = (trace R N) (f ∘ₗ h ∘ₗ g)
state_after: no goals
Theorem: Finpartition.IsEquipartition.card_interedges_sparsePairs_le
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: calc
  _ ≤ _ := hP.card_interedges_sparsePairs_le' hε
  _ ≤ ε * (A.card + A.card)^2 := by gcongr; exact P.card_parts_le_card
  _ = _ := by ring
state_before: α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε δ : 𝕜
u v s t : Finset α
hP : P.IsEquipartition
hε : 0 ≤ ε
⊢ ↑((P.sparsePairs G ε).biUnion fun x =>
          match x with
          | (U, V) => G.interedges U V).card ≤
    4 * ε * ↑A.card ^ 2
state_after: no goals

tactic: gcongr
state_before: α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε δ : 𝕜
u v s t : Finset α
hP : P.IsEquipartition
hε : 0 ≤ ε
⊢ ε * (↑A.card + ↑P.parts.card) ^ 2 ≤ ε * (↑A.card + ↑A.card) ^ 2
state_after: case h.hab.bc.h
α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε δ : 𝕜
u v s t : Finset α
hP : P.IsEquipartition
hε : 0 ≤ ε
⊢ P.parts.card ≤ A.card

tactic: exact P.card_parts_le_card
state_before: case h.hab.bc.h
α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε δ : 𝕜
u v s t : Finset α
hP : P.IsEquipartition
hε : 0 ≤ ε
⊢ P.parts.card ≤ A.card
state_after: no goals

tactic: ring
state_before: α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε δ : 𝕜
u v s t : Finset α
hP : P.IsEquipartition
hε : 0 ≤ ε
⊢ ε * (↑A.card + ↑A.card) ^ 2 = 4 * ε * ↑A.card ^ 2
state_after: no goals
Theorem: Tuple.graph.card
File: Mathlib/Data/Fin/Tuple/Sort.lean

tactic: rw [graph, Finset.card_image_of_injective]
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ (graph f).card = n
state_after: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ Finset.univ.card = n

case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ Function.Injective fun i => (f i, i)

tactic: exact Finset.card_fin _
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ Finset.univ.card = n
state_after: no goals

tactic: intro _ _
state_before: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ Function.Injective fun i => (f i, i)
state_after: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
a₁✝ a₂✝ : Fin n
⊢ (fun i => (f i, i)) a₁✝ = (fun i => (f i, i)) a₂✝ → a₁✝ = a₂✝

tactic: dsimp only
state_before: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
a₁✝ a₂✝ : Fin n
⊢ (fun i => (f i, i)) a₁✝ = (fun i => (f i, i)) a₂✝ → a₁✝ = a₂✝
state_after: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
a₁✝ a₂✝ : Fin n
⊢ (f a₁✝, a₁✝) = (f a₂✝, a₂✝) → a₁✝ = a₂✝

tactic: rw [Prod.ext_iff]
state_before: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
a₁✝ a₂✝ : Fin n
⊢ (f a₁✝, a₁✝) = (f a₂✝, a₂✝) → a₁✝ = a₂✝
state_after: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
a₁✝ a₂✝ : Fin n
⊢ (f a₁✝, a₁✝).1 = (f a₂✝, a₂✝).1 ∧ (f a₁✝, a₁✝).2 = (f a₂✝, a₂✝).2 → a₁✝ = a₂✝

tactic: simp
state_before: case H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
a₁✝ a₂✝ : Fin n
⊢ (f a₁✝, a₁✝).1 = (f a₂✝, a₂✝).1 ∧ (f a₁✝, a₁✝).2 = (f a₂✝, a₂✝).2 → a₁✝ = a₂✝
state_after: no goals
Theorem: SignType.mul_assoc
File: Mathlib/Data/Sign.lean

tactic: rintro ⟨⟩ ⟨⟩ ⟨⟩ <;> rfl
state_before: ⊢ ∀ (a b c : SignType), a * b * c = a * (b * c)
state_after: no goals
Theorem: GeneralizedContinuedFraction.zero_le_of_denom
File: Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean

tactic: rw [denom_eq_conts_b, nth_cont_eq_succ_nth_cont_aux]
state_before: K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
⊢ 0 ≤ (of v).denominators n
state_after: K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
⊢ 0 ≤ ((of v).continuantsAux (n + 1)).b

tactic: exact zero_le_of_continuantsAux_b
state_before: K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
⊢ 0 ≤ ((of v).continuantsAux (n + 1)).b
state_after: no goals
Theorem: HomologicalComplex.descOpcycles_comp
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

tactic: rw [reassoc_of% hk, zero_comp]
state_before: C : Type u_1
inst✝² : Category.{?u.57220, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝ : K.HasHomology i
A A' : C
k : K.X i ⟶ A
j : ι
hj : c.prev i = j
hk : K.d j i ≫ k = 0
α : A ⟶ A'
⊢ K.d j i ≫ k ≫ α = 0
state_after: no goals

tactic: simp only [← cancel_epi (K.pOpcycles i), p_descOpcycles_assoc, p_descOpcycles]
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝ : K.HasHomology i
A A' : C
k : K.X i ⟶ A
j : ι
hj : c.prev i = j
hk : K.d j i ≫ k = 0
α : A ⟶ A'
⊢ K.descOpcycles k j hj hk ≫ α = K.descOpcycles (k ≫ α) j hj ⋯
state_after: no goals
Theorem: Equiv.transPartialEquiv_trans
File: Mathlib/Logic/Equiv/PartialEquiv.lean

tactic: simp only [transPartialEquiv_eq_trans, PartialEquiv.trans_assoc]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : α ≃ β
e' : β ≃ γ
e : α ≃ β
f' : PartialEquiv β γ
f'' : PartialEquiv γ δ
⊢ (e.transPartialEquiv f').trans f'' = e.transPartialEquiv (f'.trans f'')
state_after: no goals
Theorem: DFinsupp.comapDomain_add
File: Mathlib/Data/DFinsupp/Basic.lean

tactic: ext
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
κ : Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
h : κ → ι
hh : Function.Injective h
f g : Π₀ (i : ι), β i
⊢ comapDomain h hh (f + g) = comapDomain h hh f + comapDomain h hh g
state_after: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
κ : Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
h : κ → ι
hh : Function.Injective h
f g : Π₀ (i : ι), β i
i✝ : κ
⊢ (comapDomain h hh (f + g)) i✝ = (comapDomain h hh f + comapDomain h hh g) i✝

tactic: rw [add_apply, comapDomain_apply, comapDomain_apply, comapDomain_apply, add_apply]
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
κ : Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
h : κ → ι
hh : Function.Injective h
f g : Π₀ (i : ι), β i
i✝ : κ
⊢ (comapDomain h hh (f + g)) i✝ = (comapDomain h hh f + comapDomain h hh g) i✝
state_after: no goals