tasksource/leandojo huggingface dataset:
Theorem: EuclideanGeometry.angle_eq_zero_of_angle_eq_pi_left
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

tactic: unfold angle at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
h : ∠ p1 p2 p3 = π
⊢ ∠ p2 p1 p3 = 0

tactic: rw [angle_eq_pi_iff] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
h : InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = π
⊢ ∠ p2 p1 p3 = 0

tactic: rcases h with ⟨hp1p2, ⟨r, ⟨hr, hpr⟩⟩⟩
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
h : p1 -ᵥ p2 ≠ 0 ∧ ∃ r, r < 0 ∧ p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ ∠ p2 p1 p3 = 0

tactic: unfold angle
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
hp1p2 : p1 -ᵥ p2 ≠ 0
r : ℝ
hr : r < 0
hpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ ∠ p2 p1 p3 = 0

tactic: rw [angle_eq_zero_iff]
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
hp1p2 : p1 -ᵥ p2 ≠ 0
r : ℝ
hr : r < 0
hpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ InnerProductGeometry.angle (p2 -ᵥ p1) (p3 -ᵥ p1) = 0

tactic: rw [← neg_vsub_eq_vsub_rev, neg_ne_zero] at hp1p2
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
hp1p2 : p1 -ᵥ p2 ≠ 0
r : ℝ
hr : r < 0
hpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ p2 -ᵥ p1 ≠ 0 ∧ ∃ r, 0 < r ∧ p3 -ᵥ p1 = r • (p2 -ᵥ p1)

tactic: use hp1p2, -r + 1, add_pos (neg_pos_of_neg hr) zero_lt_one
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
hp1p2 : p2 -ᵥ p1 ≠ 0
r : ℝ
hr : r < 0
hpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ p2 -ᵥ p1 ≠ 0 ∧ ∃ r, 0 < r ∧ p3 -ᵥ p1 = r • (p2 -ᵥ p1)

tactic: rw [add_smul, ← neg_vsub_eq_vsub_rev p1 p2, smul_neg]
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
hp1p2 : p2 -ᵥ p1 ≠ 0
r : ℝ
hr : r < 0
hpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ p3 -ᵥ p1 = (-r + 1) • (p2 -ᵥ p1)

tactic: simp [← hpr]
state_before: case intro.intro.intro
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p1 p2 p3 : P
hp1p2 : p2 -ᵥ p1 ≠ 0
r : ℝ
hr : r < 0
hpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)
⊢ p3 -ᵥ p1 = -(-r • (p1 -ᵥ p2)) + 1 • -(p1 -ᵥ p2)
Theorem: toZ_iterate_pred_ge
File: Mathlib/Order/SuccPred/LinearLocallyFinite.lean

tactic: cases' le_or_lt i0 ((pred^[n]) i0) with h h
state_before: ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
⊢ -↑n ≤ toZ i0 ((pred^[n]) i0)

tactic: have h_eq : (pred^[n]) i0 = i0 := le_antisymm (pred_iterate_le _ _) h
state_before: case inl
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
h : i0 ≤ (pred^[n]) i0
⊢ -↑n ≤ toZ i0 ((pred^[n]) i0)

tactic: rw [h_eq, toZ_of_eq]
state_before: case inl
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
h : i0 ≤ (pred^[n]) i0
h_eq : (pred^[n]) i0 = i0
⊢ -↑n ≤ toZ i0 ((pred^[n]) i0)

tactic: simp only [Right.neg_nonpos_iff, Nat.cast_nonneg]
state_before: case inl
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
h : i0 ≤ (pred^[n]) i0
h_eq : (pred^[n]) i0 = i0
⊢ -↑n ≤ 0

tactic: rw [toZ_of_lt h, neg_le_neg_iff]
state_before: case inr
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
h : (pred^[n]) i0 < i0
⊢ -↑n ≤ toZ i0 ((pred^[n]) i0)

tactic: norm_cast
state_before: case inr
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
h : (pred^[n]) i0 < i0
⊢ ↑(Nat.find (_ : ∃ n_1, (pred^[n_1]) i0 = (pred^[n]) i0)) ≤ ↑n

tactic: exact Nat.find_min' _ rfl
state_before: case inr
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
h : (pred^[n]) i0 < i0
⊢ Nat.find (_ : ∃ n_1, (pred^[n_1]) i0 = (pred^[n]) i0) ≤ n
Theorem: Behrend.lower_bound_le_one'
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: rw [← log_le_log (mul_pos (cast_pos.2 (zero_lt_two.trans_le hN)) (exp_pos _)) zero_lt_one,
  log_one, log_mul (cast_pos.2 (zero_lt_two.trans_le hN)).ne' (exp_pos _).ne', log_exp, neg_mul, ←
  sub_eq_add_neg, sub_nonpos, ←
  div_le_iff (Real.sqrt_pos.2 <| log_pos <| one_lt_cast.2 <| one_lt_two.trans_le hN), div_sqrt,
  sqrt_le_left zero_le_four, log_le_iff_le_exp (cast_pos.2 (zero_lt_two.trans_le hN))]
state_before: α : Type ?u.840499
β : Type ?u.840502
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
hN' : N ≤ 4096
⊢ ↑N * exp (-4 * Real.sqrt (log ↑N)) ≤ 1

tactic: norm_num1
state_before: α : Type ?u.840499
β : Type ?u.840502
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
hN' : N ≤ 4096
⊢ ↑N ≤ exp (4 ^ 2)

tactic: apply le_trans _ four_zero_nine_six_lt_exp_sixteen.le
state_before: α : Type ?u.840499
β : Type ?u.840502
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
hN' : N ≤ 4096
⊢ ↑N ≤ exp 16

tactic: exact_mod_cast hN'
state_before: α : Type ?u.840499
β : Type ?u.840502
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
hN' : N ≤ 4096
⊢ ↑N ≤ 4096
Theorem: Set.einfsep_zero
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: simp_rw [einfsep, ← _root_.bot_eq_zero, iInf_eq_bot, iInf_lt_iff]
state_before: α : Type u_1
β : Type ?u.1619
inst✝ : EDist α
x y : α
s t : Set α
⊢ einfsep s = 0 ↔ ∀ (C : ℝ≥0∞), 0 < C → ∃ x x_1 y x_2 _hxy, edist x y < C
Theorem: ENNReal.tendsto_cofinite_zero_of_tsum_ne_top
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: have f_ne_top : ∀ n, f n ≠ ∞ := ENNReal.ne_top_of_tsum_ne_top hf
state_before: α✝ : Type ?u.261608
β : Type ?u.261611
γ : Type ?u.261614
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α✝ → ℝ≥0∞
α : Type u_1
f : α → ℝ≥0∞
hf : (∑' (x : α), f x) ≠ ⊤
⊢ Tendsto f cofinite (𝓝 0)

tactic: have h_f_coe : f = fun n => ((f n).toNNReal : ENNReal) :=
  funext fun n => (coe_toNNReal (f_ne_top n)).symm
state_before: α✝ : Type ?u.261608
β : Type ?u.261611
γ : Type ?u.261614
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α✝ → ℝ≥0∞
α : Type u_1
f : α → ℝ≥0∞
hf : (∑' (x : α), f x) ≠ ⊤
f_ne_top : ∀ (n : α), f n ≠ ⊤
⊢ Tendsto f cofinite (𝓝 0)

tactic: rw [h_f_coe, ← @coe_zero, tendsto_coe]
state_before: α✝ : Type ?u.261608
β : Type ?u.261611
γ : Type ?u.261614
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α✝ → ℝ≥0∞
α : Type u_1
f : α → ℝ≥0∞
hf : (∑' (x : α), f x) ≠ ⊤
f_ne_top : ∀ (n : α), f n ≠ ⊤
h_f_coe : f = fun n => ↑(ENNReal.toNNReal (f n))
⊢ Tendsto f cofinite (𝓝 0)

tactic: exact NNReal.tendsto_cofinite_zero_of_summable (summable_toNNReal_of_tsum_ne_top hf)
state_before: α✝ : Type ?u.261608
β : Type ?u.261611
γ : Type ?u.261614
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α✝ → ℝ≥0∞
α : Type u_1
f : α → ℝ≥0∞
hf : (∑' (x : α), f x) ≠ ⊤
f_ne_top : ∀ (n : α), f n ≠ ⊤
h_f_coe : f = fun n => ↑(ENNReal.toNNReal (f n))
⊢ Tendsto (fun n => ENNReal.toNNReal (f n)) cofinite (𝓝 0)
Theorem: LocalEquiv.restr_trans
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: simp [trans_source, inter_comm, inter_assoc]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
δ : Type ?u.49198
e : LocalEquiv α β
e' : LocalEquiv β γ
s : Set α
⊢ (LocalEquiv.trans (LocalEquiv.restr e s) e').source = (LocalEquiv.restr (LocalEquiv.trans e e') s).source
Theorem: NNReal.exists_pow_lt_of_lt_one
File: Mathlib/Data/Real/NNReal.lean

tactic: simpa only [← coe_pow, NNReal.coe_lt_coe] using
  exists_pow_lt_of_lt_one (NNReal.coe_pos.2 ha) (NNReal.coe_lt_coe.2 hb)
state_before: a b : ℝ≥0
ha : 0 < a
hb : b < 1
⊢ ∃ n, b ^ n < a
Theorem: List.Func.pointwise_nil
File: Mathlib/Data/List/Func.lean

tactic: simp only [pointwise_nil as, pointwise, eq_self_iff_true, and_self_iff, List.map]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β → γ
a : α
as : List α
⊢ pointwise f (a :: as) [] = map (fun a => f a default) (a :: as)
Theorem: CategoryTheory.Idempotents.Karoubi.decompId_i_toKaroubi
File: Mathlib/CategoryTheory/Idempotents/Karoubi.lean

tactic: rfl
state_before: C : Type u_2
inst✝ : Category C
X : C
⊢ decompId_i ((toKaroubi C).obj X) = 𝟙 ((toKaroubi C).obj X)
Theorem: Set.Iio_diff_Iic
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [diff_eq, compl_Iic, inter_comm, Ioi_inter_Iio]
state_before: α : Type u_1
β : Type ?u.62786
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
⊢ Iio b \ Iic a = Ioo a b
Theorem: Nat.Partrec'.part_iff₂
File: Mathlib/Computability/Halting.lean

tactic: simp only [head_cons, tail_cons]
state_before: f : ℕ → ℕ →. ℕ
h : _root_.Partrec fun v => f (Vector.head v) (Vector.head (Vector.tail v))
v : ℕ × ℕ
⊢ f (Vector.head (v.fst ::ᵥ v.snd ::ᵥ nil)) (Vector.head (Vector.tail (v.fst ::ᵥ v.snd ::ᵥ nil))) = f v.fst v.snd
Theorem: Finset.union_inter_cancel_right
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← coe_inj, coe_inter, coe_union, Set.union_inter_cancel_right]
state_before: α : Type u_1
β : Type ?u.180770
γ : Type ?u.180773
inst✝ : DecidableEq α
s✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α
a b : α
s t : Finset α
⊢ (s ∪ t) ∩ t = t
Theorem: Std.AssocList.eraseP_toList
File: Std/Data/AssocList.lean

tactic: induction l <;> simp [List.eraseP, cond]
state_before: α : Type u_1
β : Type u_2
p : α → β → Bool
l : AssocList α β
⊢ toList (eraseP p l) =
    List.eraseP
      (fun x =>
        match x with
        | (a, b) => p a b)
      (toList l)

tactic: split <;> simp [*]
state_before: case cons
α : Type u_1
β : Type u_2
p : α → β → Bool
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ :
  toList (eraseP p tail✝) =
    List.eraseP
      (fun x =>
        match x with
        | (a, b) => p a b)
      (toList tail✝)
⊢ toList
      (match p key✝ value✝ with
      | true => tail✝
      | false => cons key✝ value✝ (eraseP p tail✝)) =
    match p key✝ value✝ with
    | true => toList tail✝
    | false => (key✝, value✝) :: List.eraseP (fun x => p x.fst x.snd) (toList tail✝)
Theorem: Set.Ico_diff_Ioo_same
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [← Ico_diff_left, diff_diff_cancel_left (singleton_subset_iff.2 <| left_mem_Ico.2 h)]
state_before: α : Type u_1
β : Type ?u.43065
inst✝ : PartialOrder α
a b c : α
h : a < b
⊢ Ico a b \ Ioo a b = {a}
Theorem: RatFunc.denom_dvd
File: Mathlib/FieldTheory/RatFunc.lean

tactic: constructor
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hq : q ≠ 0
⊢ denom x ∣ q ↔ ∃ p, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q

tactic: rintro ⟨p, rfl⟩
state_before: case mp
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hq : q ≠ 0
⊢ denom x ∣ q → ∃ p, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q

tactic: obtain ⟨_hx, hp⟩ := mul_ne_zero_iff.mp hq
state_before: case mp.intro
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hq : denom x * p ≠ 0
⊢ ∃ p_1, x = ↑(algebraMap K[X] (RatFunc K)) p_1 / ↑(algebraMap K[X] (RatFunc K)) (denom x * p)

tactic: use num x * p
state_before: case mp.intro.intro
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hq : denom x * p ≠ 0
_hx : denom x ≠ 0
hp : p ≠ 0
⊢ ∃ p_1, x = ↑(algebraMap K[X] (RatFunc K)) p_1 / ↑(algebraMap K[X] (RatFunc K)) (denom x * p)

tactic: rw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, div_self, mul_one, num_div_denom]
state_before: case mp.intro.intro
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hq : denom x * p ≠ 0
_hx : denom x ≠ 0
hp : p ≠ 0
⊢ x = ↑(algebraMap K[X] (RatFunc K)) (num x * p) / ↑(algebraMap K[X] (RatFunc K)) (denom x * p)

tactic: exact algebraMap_ne_zero hp
state_before: case mp.intro.intro
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hq : denom x * p ≠ 0
_hx : denom x ≠ 0
hp : p ≠ 0
⊢ ↑(algebraMap K[X] (RatFunc K)) p ≠ 0

tactic: rintro ⟨p, rfl⟩
state_before: case mpr
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hq : q ≠ 0
⊢ (∃ p, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) → denom x ∣ q

tactic: exact denom_div_dvd p q
state_before: case mpr.intro
K : Type u
inst✝ : Field K
q : K[X]
hq : q ≠ 0
p : K[X]
⊢ denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ q
Theorem: Dense.smul
File: Mathlib/Topology/Algebra/ConstMulAction.lean

tactic: rw [dense_iff_closure_eq] at hs ⊢
state_before: M : Type ?u.62639
α : Type u_1
β : Type ?u.62645
G : Type u_2
inst✝⁴ : TopologicalSpace α
inst✝³ : Group G
inst✝² : MulAction G α
inst✝¹ : ContinuousConstSMul G α
inst✝ : TopologicalSpace β
f : β → α
b : β
s✝ : Set β
c : G
s : Set α
hs : Dense s
⊢ Dense (c • s)

tactic: rw [closure_smul, hs, smul_set_univ]
state_before: M : Type ?u.62639
α : Type u_1
β : Type ?u.62645
G : Type u_2
inst✝⁴ : TopologicalSpace α
inst✝³ : Group G
inst✝² : MulAction G α
inst✝¹ : ContinuousConstSMul G α
inst✝ : TopologicalSpace β
f : β → α
b : β
s✝ : Set β
c : G
s : Set α
hs : closure s = univ
⊢ closure (c • s) = univ
Theorem: Nat.one_le_pow
File: Mathlib/Data/Nat/Pow.lean

tactic: rw [← one_pow n]
state_before: n m : ℕ
h : 0 < m
⊢ 1 ≤ m ^ n

tactic: exact Nat.pow_le_pow_of_le_left h n
state_before: n m : ℕ
h : 0 < m
⊢ 1 ^ n ≤ m ^ n
Theorem: Matrix.cramer_subsingleton_apply
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: rw [cramer_apply, det_eq_elem_of_subsingleton _ i, updateColumn_self]
state_before: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A✝ : Matrix n n α
b✝ : n → α
inst✝ : Subsingleton n
A : Matrix n n α
b : n → α
i : n
⊢ ↑(cramer A) b i = b i
Theorem: Order.isPredLimit_toDual_iff
File: Mathlib/Order/SuccPred/Limit.lean

tactic: simp [IsSuccLimit, IsPredLimit]
state_before: α : Type u_1
inst✝ : LT α
a : α
⊢ IsPredLimit (↑toDual a) ↔ IsSuccLimit a
Theorem: norm_add_sq
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: repeat' rw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2331497
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2

tactic: rw [inner_add_add_self, two_mul]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2331497
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ↑re (inner (x + y) (x + y)) = ↑re (inner x x) + 2 * ↑re (inner x y) + ↑re (inner y y)

tactic: simp only [add_assoc, add_left_inj, add_right_inj, AddMonoidHom.map_add]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2331497
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ↑re (inner x x + inner x y + inner y x + inner y y) =
    ↑re (inner x x) + (↑re (inner x y) + ↑re (inner x y)) + ↑re (inner y y)

tactic: rw [← inner_conj_symm, conj_re]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2331497
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ↑re (inner y x) = ↑re (inner x y)

tactic: rw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2331497
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ↑re (inner (x + y) (x + y)) = ↑re (inner x x) + 2 * ↑re (inner x y) + ↑re (inner y y)
Theorem: Quiver.reverse_reverse
File: Mathlib/Combinatorics/Quiver/Symmetric.lean

tactic: apply h.inv'
state_before: U : Type ?u.581
V : Type u_1
W : Type ?u.587
inst✝² : Quiver U
inst✝¹ : Quiver V
inst✝ : Quiver W
h : HasInvolutiveReverse V
a b : V
f : a ⟶ b
⊢ reverse (reverse f) = f
Theorem: Affine.Simplex.face_centroid_eq_iff
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: rw [face_centroid_eq_centroid, face_centroid_eq_centroid]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : CharZero k
n : ℕ
s : Simplex k P n
fs₁ fs₂ : Finset (Fin (n + 1))
m₁ m₂ : ℕ
h₁ : Finset.card fs₁ = m₁ + 1
h₂ : Finset.card fs₂ = m₂ + 1
⊢ Finset.centroid k Finset.univ (face s h₁).points = Finset.centroid k Finset.univ (face s h₂).points ↔ fs₁ = fs₂

tactic: exact s.centroid_eq_iff h₁ h₂
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : CharZero k
n : ℕ
s : Simplex k P n
fs₁ fs₂ : Finset (Fin (n + 1))
m₁ m₂ : ℕ
h₁ : Finset.card fs₁ = m₁ + 1
h₂ : Finset.card fs₂ = m₂ + 1
⊢ Finset.centroid k fs₁ s.points = Finset.centroid k fs₂ s.points ↔ fs₁ = fs₂
Theorem: MeasureTheory.measureUnivNNReal_pos
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: contrapose! hμ
state_before: α : Type u_1
β : Type ?u.644466
γ : Type ?u.644469
δ : Type ?u.644472
ι : Type ?u.644475
R : Type ?u.644478
R' : Type ?u.644481
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
⊢ 0 < measureUnivNNReal μ

tactic: simpa [measureUnivNNReal_eq_zero, le_zero_iff] using hμ
state_before: α : Type u_1
β : Type ?u.644466
γ : Type ?u.644469
δ : Type ?u.644472
ι : Type ?u.644475
R : Type ?u.644478
R' : Type ?u.644481
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsFiniteMeasure μ
hμ : measureUnivNNReal μ ≤ 0
⊢ μ = 0
Theorem: GradedMonoid.mk_list_dProd
File: Mathlib/Algebra/GradedMonoid.lean

tactic: match l with
| [] => simp; rfl
| head::tail =>
  simp[← GradedMonoid.mk_list_dProd tail _ _, GradedMonoid.mk_mul_mk, List.prod_cons]
state_before: ι : Type u_2
α : Type u_1
A : ι → Type u_3
inst✝¹ : AddMonoid ι
inst✝ : GMonoid A
l : List α
fι : α → ι
fA : (a : α) → A (fι a)
⊢ mk (List.dProdIndex l fι) (List.dProd l fι fA) = List.prod (List.map (fun a => mk (fι a) (fA a)) l)

tactic: simp
state_before: ι : Type u_2
α : Type u_1
A : ι → Type u_3
inst✝¹ : AddMonoid ι
inst✝ : GMonoid A
l : List α
fι : α → ι
fA : (a : α) → A (fι a)
⊢ mk (List.dProdIndex [] fι) (List.dProd [] fι fA) = List.prod (List.map (fun a => mk (fι a) (fA a)) [])

tactic: rfl
state_before: ι : Type u_2
α : Type u_1
A : ι → Type u_3
inst✝¹ : AddMonoid ι
inst✝ : GMonoid A
l : List α
fι : α → ι
fA : (a : α) → A (fι a)
⊢ mk 0 GOne.one = 1

tactic: simp[← GradedMonoid.mk_list_dProd tail _ _, GradedMonoid.mk_mul_mk, List.prod_cons]
state_before: ι : Type u_2
α : Type u_1
A : ι → Type u_3
inst✝¹ : AddMonoid ι
inst✝ : GMonoid A
l : List α
fι : α → ι
fA : (a : α) → A (fι a)
head : α
tail : List α
⊢ mk (List.dProdIndex (head :: tail) fι) (List.dProd (head :: tail) fι fA) =
    List.prod (List.map (fun a => mk (fι a) (fA a)) (head :: tail))
Theorem: FirstOrder.Language.realize_noTopOrder_iff
File: Mathlib/ModelTheory/Order.lean

tactic: simp only [noTopOrderSentence, Sentence.Realize, Formula.Realize, BoundedFormula.realize_all,
  BoundedFormula.realize_ex, BoundedFormula.realize_not, Term.realize, Term.realize_le,
  Sum.elim_inr]
state_before: L : Language
α : Type w
M : Type w'
n : ℕ
inst✝ : LE M
⊢ M ⊨ noTopOrderSentence Language.order ↔ NoTopOrder M

tactic: refine' ⟨fun h => ⟨fun a => h a⟩, _⟩
state_before: L : Language
α : Type w
M : Type w'
n : ℕ
inst✝ : LE M
⊢ (∀ (a : M), ∃ a_1, ¬Fin.snoc (Fin.snoc default a) a_1 1 ≤ Fin.snoc (Fin.snoc default a) a_1 0) ↔ NoTopOrder M

tactic: intro h a
state_before: L : Language
α : Type w
M : Type w'
n : ℕ
inst✝ : LE M
⊢ NoTopOrder M → ∀ (a : M), ∃ a_1, ¬Fin.snoc (Fin.snoc default a) a_1 1 ≤ Fin.snoc (Fin.snoc default a) a_1 0

tactic: exact exists_not_le a
state_before: L : Language
α : Type w
M : Type w'
n : ℕ
inst✝ : LE M
h : NoTopOrder M
a : M
⊢ ∃ a_1, ¬Fin.snoc (Fin.snoc default a) a_1 1 ≤ Fin.snoc (Fin.snoc default a) a_1 0
Theorem: associated_one_of_associated_mul_one
File: Mathlib/Algebra/Associated.lean

tactic: simpa [mul_assoc] using h
state_before: α : Type u_1
β : Type ?u.155492
γ : Type ?u.155495
δ : Type ?u.155498
inst✝ : CommMonoid α
a b : α
u : αˣ
h : a * b * ↑u = 1
⊢ a * (b * ↑u) = 1
Theorem: Metric.sphere_isEmpty_of_subsingleton
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [sphere_eq_empty_of_subsingleton hε]
state_before: α : Type u
β : Type v
X : Type ?u.33233
ι : Type ?u.33236
inst✝¹ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : Subsingleton α
hε : ε ≠ 0
⊢ IsEmpty ↑(sphere x ε)

tactic: infer_instance
state_before: α : Type u
β : Type v
X : Type ?u.33233
ι : Type ?u.33236
inst✝¹ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : Subsingleton α
hε : ε ≠ 0
⊢ IsEmpty ↑∅
Theorem: LinearMap.toMatrix₂_comp
File: Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean

tactic: rw [← LinearMap.compl₂_id (B.comp f), ← LinearMap.compl₁₂, LinearMap.toMatrix₂_compl₁₂ b₁ b₂]
state_before: R : Type u_1
R₁ : Type ?u.1586479
R₂ : Type ?u.1586482
M : Type ?u.1586485
M₁ : Type u_2
M₂ : Type u_3
M₁' : Type u_4
M₂' : Type ?u.1586497
n : Type u_7
m : Type u_5
n' : Type u_6
m' : Type ?u.1586509
ι : Type ?u.1586512
inst✝¹⁶ : CommRing R
inst✝¹⁵ : AddCommMonoid M₁
inst✝¹⁴ : Module R M₁
inst✝¹³ : AddCommMonoid M₂
inst✝¹² : Module R M₂
inst✝¹¹ : DecidableEq n
inst✝¹⁰ : Fintype n
inst✝⁹ : DecidableEq m
inst✝⁸ : Fintype m
b₁ : Basis n R M₁
b₂ : Basis m R M₂
inst✝⁷ : AddCommMonoid M₁'
inst✝⁶ : Module R M₁'
inst✝⁵ : AddCommMonoid M₂'
inst✝⁴ : Module R M₂'
b₁' : Basis n' R M₁'
b₂' : Basis m' R M₂'
inst✝³ : Fintype n'
inst✝² : Fintype m'
inst✝¹ : DecidableEq n'
inst✝ : DecidableEq m'
B : M₁ →ₗ[R] M₂ →ₗ[R] R
f : M₁' →ₗ[R] M₁
⊢ ↑(toMatrix₂ b₁' b₂) (comp B f) = (↑(toMatrix b₁' b₁) f)ᵀ ⬝ ↑(toMatrix₂ b₁ b₂) B

tactic: simp
state_before: R : Type u_1
R₁ : Type ?u.1586479
R₂ : Type ?u.1586482
M : Type ?u.1586485
M₁ : Type u_2
M₂ : Type u_3
M₁' : Type u_4
M₂' : Type ?u.1586497
n : Type u_7
m : Type u_5
n' : Type u_6
m' : Type ?u.1586509
ι : Type ?u.1586512
inst✝¹⁶ : CommRing R
inst✝¹⁵ : AddCommMonoid M₁
inst✝¹⁴ : Module R M₁
inst✝¹³ : AddCommMonoid M₂
inst✝¹² : Module R M₂
inst✝¹¹ : DecidableEq n
inst✝¹⁰ : Fintype n
inst✝⁹ : DecidableEq m
inst✝⁸ : Fintype m
b₁ : Basis n R M₁
b₂ : Basis m R M₂
inst✝⁷ : AddCommMonoid M₁'
inst✝⁶ : Module R M₁'
inst✝⁵ : AddCommMonoid M₂'
inst✝⁴ : Module R M₂'
b₁' : Basis n' R M₁'
b₂' : Basis m' R M₂'
inst✝³ : Fintype n'
inst✝² : Fintype m'
inst✝¹ : DecidableEq n'
inst✝ : DecidableEq m'
B : M₁ →ₗ[R] M₂ →ₗ[R] R
f : M₁' →ₗ[R] M₁
⊢ (↑(toMatrix b₁' b₁) f)ᵀ ⬝ ↑(toMatrix₂ b₁ b₂) B ⬝ ↑(toMatrix b₂ b₂) id = (↑(toMatrix b₁' b₁) f)ᵀ ⬝ ↑(toMatrix₂ b₁ b₂) B
Theorem: Subgroup.mem_map_equiv
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: erw [@Set.mem_image_equiv _ _ (↑K) f.toEquiv x]
state_before: G : Type u_1
G' : Type ?u.254283
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.254292
inst✝² : AddGroup A
H K✝ : Subgroup G
k : Set G
N : Type u_2
inst✝¹ : Group N
P : Type ?u.254319
inst✝ : Group P
f : G ≃* N
K : Subgroup G
x : N
⊢ x ∈ map (MulEquiv.toMonoidHom f) K ↔ ↑(MulEquiv.symm f) x ∈ K

tactic: rfl
state_before: G : Type u_1
G' : Type ?u.254283
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.254292
inst✝² : AddGroup A
H K✝ : Subgroup G
k : Set G
N : Type u_2
inst✝¹ : Group N
P : Type ?u.254319
inst✝ : Group P
f : G ≃* N
K : Subgroup G
x : N
⊢ ↑f.symm x ∈ ↑K ↔ ↑(MulEquiv.symm f) x ∈ K