tasksource/leandojo huggingface dataset:
Theorem: strongRankCondition_iff_succ
File: Mathlib/LinearAlgebra/InvariantBasisNumber.lean

tactic: refine' ⟨fun h n => fun f hf => _, fun h => ⟨@fun n m f hf => _⟩⟩
state_before: R : Type u
inst✝ : Semiring R
⊢ StrongRankCondition R ↔ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f

tactic: letI : StrongRankCondition R := h
state_before: case refine'_1
R : Type u
inst✝ : Semiring R
h : StrongRankCondition R
n : ℕ
f : (Fin (n + 1) → R) →ₗ[R] Fin n → R
hf : Injective ↑f
⊢ False

tactic: exact Nat.not_succ_le_self n (le_of_fin_injective R f hf)
state_before: case refine'_1
R : Type u
inst✝ : Semiring R
h : StrongRankCondition R
n : ℕ
f : (Fin (n + 1) → R) →ₗ[R] Fin n → R
hf : Injective ↑f
this : StrongRankCondition R := h
⊢ False

tactic: by_contra H
state_before: case refine'_2
R : Type u
inst✝ : Semiring R
h : ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f
n m : ℕ
f : (Fin n → R) →ₗ[R] Fin m → R
hf : Injective ↑f
⊢ n ≤ m

tactic: exact
  h m (f.comp (Function.ExtendByZero.linearMap R (Fin.castLE (not_le.1 H))))
    (hf.comp (Function.extend_injective (RelEmbedding.injective _) _))
state_before: case refine'_2
R : Type u
inst✝ : Semiring R
h : ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f
n m : ℕ
f : (Fin n → R) →ₗ[R] Fin m → R
hf : Injective ↑f
H : ¬n ≤ m
⊢ False
Theorem: Array.getElem_eq_data_get
File: Std/Data/Array/Init/Lemmas.lean

tactic: by_cases i < a.size <;> simp [*] <;> rfl
state_before: α : Type u_1
i : Nat
a : Array α
h : i < size a
⊢ a[i] = List.get a.data { val := i, isLt := h }
Theorem: Cardinal.ord_isLimit
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: refine' ⟨fun h => aleph0_ne_zero _, fun a => lt_imp_lt_of_le_imp_le fun h => _⟩
state_before: c : Cardinal
co : ℵ₀ ≤ c
⊢ Ordinal.IsLimit (ord c)

tactic: rw [← Ordinal.le_zero, ord_le] at h
state_before: case refine'_1
c : Cardinal
co : ℵ₀ ≤ c
h : ord c = 0
⊢ ℵ₀ = 0

tactic: simpa only [card_zero, nonpos_iff_eq_zero] using co.trans h
state_before: case refine'_1
c : Cardinal
co : ℵ₀ ≤ c
h : c ≤ card 0
⊢ ℵ₀ = 0

tactic: rw [ord_le] at h⊢
state_before: case refine'_2
c : Cardinal
co : ℵ₀ ≤ c
a : Ordinal
h : ord c ≤ succ a
⊢ ord c ≤ a

tactic: rwa [← @add_one_of_aleph0_le (card a), ← card_succ]
state_before: case refine'_2
c : Cardinal
co : ℵ₀ ≤ c
a : Ordinal
h : c ≤ card (succ a)
⊢ c ≤ card a

tactic: rw [← ord_le, ← le_succ_of_isLimit, ord_le]
state_before: case refine'_2
c : Cardinal
co : ℵ₀ ≤ c
a : Ordinal
h : c ≤ card (succ a)
⊢ ℵ₀ ≤ card a

tactic: exact co.trans h
state_before: case refine'_2
c : Cardinal
co : ℵ₀ ≤ c
a : Ordinal
h : c ≤ card (succ a)
⊢ ℵ₀ ≤ card (succ a)

tactic: rw [ord_aleph0]
state_before: case refine'_2.h
c : Cardinal
co : ℵ₀ ≤ c
a : Ordinal
h : c ≤ card (succ a)
⊢ Ordinal.IsLimit (ord ℵ₀)

tactic: exact omega_isLimit
state_before: case refine'_2.h
c : Cardinal
co : ℵ₀ ≤ c
a : Ordinal
h : c ≤ card (succ a)
⊢ Ordinal.IsLimit ω
Theorem: Set.Finite.toFinset_empty
File: Mathlib/Data/Set/Finite.lean

tactic: ext
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs : Set.Finite s
ht : Set.Finite t
h : Set.Finite ∅
⊢ Finite.toFinset h = ∅

tactic: simp
state_before: case a
α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs : Set.Finite s
ht : Set.Finite t
h : Set.Finite ∅
a✝ : α
⊢ a✝ ∈ Finite.toFinset h ↔ a✝ ∈ ∅
Theorem: ZMod.eq_iff_modEq_nat
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n a b : ℕ
⊢ ↑a = ↑b ↔ a ≡ b [MOD n]

tactic: simp [Nat.ModEq, Int.coe_nat_inj', Nat.mod_zero]
state_before: case zero
a b : ℕ
⊢ ↑a = ↑b ↔ a ≡ b [MOD Nat.zero]

tactic: rw [Fin.ext_iff, Nat.ModEq, ← val_nat_cast, ← val_nat_cast]
state_before: case succ
a b n✝ : ℕ
⊢ ↑a = ↑b ↔ a ≡ b [MOD Nat.succ n✝]

tactic: exact Iff.rfl
state_before: case succ
a b n✝ : ℕ
⊢ ↑↑a = ↑↑b ↔ val ↑a = val ↑b
Theorem: ENNReal.tsum_const_eq_top_of_ne_zero
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: have A : Tendsto (fun n : ℕ => (n : ℝ≥0∞) * c) atTop (𝓝 (∞ * c)) := by
  apply ENNReal.Tendsto.mul_const tendsto_nat_nhds_top
  simp only [true_or_iff, top_ne_zero, Ne.def, not_false_iff]
state_before: α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
⊢ (∑' (x : α), c) = ⊤

tactic: have B : ∀ n : ℕ, (n : ℝ≥0∞) * c ≤ ∑' _ : α, c := fun n => by
  rcases Infinite.exists_subset_card_eq α n with ⟨s, hs⟩
  simpa [hs] using @ENNReal.sum_le_tsum α (fun _ => c) s
state_before: α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
A : Tendsto (fun n => ↑n * c) atTop (𝓝 (⊤ * c))
⊢ (∑' (x : α), c) = ⊤

tactic: simpa [hc] using le_of_tendsto' A B
state_before: α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
A : Tendsto (fun n => ↑n * c) atTop (𝓝 (⊤ * c))
B : ∀ (n : ℕ), ↑n * c ≤ ∑' (x : α), c
⊢ (∑' (x : α), c) = ⊤

tactic: apply ENNReal.Tendsto.mul_const tendsto_nat_nhds_top
state_before: α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
⊢ Tendsto (fun n => ↑n * c) atTop (𝓝 (⊤ * c))

tactic: simp only [true_or_iff, top_ne_zero, Ne.def, not_false_iff]
state_before: α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
⊢ ⊤ ≠ 0 ∨ c ≠ ⊤

tactic: rcases Infinite.exists_subset_card_eq α n with ⟨s, hs⟩
state_before: α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
A : Tendsto (fun n => ↑n * c) atTop (𝓝 (⊤ * c))
n : ℕ
⊢ ↑n * c ≤ ∑' (x : α), c

tactic: simpa [hs] using @ENNReal.sum_le_tsum α (fun _ => c) s
state_before: case intro
α✝ : Type ?u.246869
β : Type ?u.246872
γ : Type ?u.246875
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α✝ → ℝ≥0∞
α : Type u_1
inst✝ : Infinite α
c : ℝ≥0∞
hc : c ≠ 0
A : Tendsto (fun n => ↑n * c) atTop (𝓝 (⊤ * c))
n : ℕ
s : Finset α
hs : Finset.card s = n
⊢ ↑n * c ≤ ∑' (x : α), c
Theorem: Ordinal.one_opow
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: apply limitRecOn a
state_before: a : Ordinal
⊢ 1 ^ a = 1

tactic: refine' fun b l IH => eq_of_forall_ge_iff fun c => _
state_before: case H₃
a : Ordinal
⊢ ∀ (o : Ordinal), IsLimit o → (∀ (o' : Ordinal), o' < o → 1 ^ o' = 1) → 1 ^ o = 1

tactic: rw [opow_le_of_limit Ordinal.one_ne_zero l]
state_before: case H₃
a b : Ordinal
l : IsLimit b
IH : ∀ (o' : Ordinal), o' < b → 1 ^ o' = 1
c : Ordinal
⊢ 1 ^ b ≤ c ↔ 1 ≤ c

tactic: exact ⟨fun H => by simpa only [opow_zero] using H 0 l.pos, fun H b' h => by rwa [IH _ h]⟩
state_before: case H₃
a b : Ordinal
l : IsLimit b
IH : ∀ (o' : Ordinal), o' < b → 1 ^ o' = 1
c : Ordinal
⊢ (∀ (b' : Ordinal), b' < b → 1 ^ b' ≤ c) ↔ 1 ≤ c

tactic: simp only [opow_zero]
state_before: case H₁
a : Ordinal
⊢ 1 ^ 0 = 1

tactic: intro _ ih
state_before: case H₂
a : Ordinal
⊢ ∀ (o : Ordinal), 1 ^ o = 1 → 1 ^ succ o = 1

tactic: simp only [opow_succ, ih, mul_one]
state_before: case H₂
a o✝ : Ordinal
ih : 1 ^ o✝ = 1
⊢ 1 ^ succ o✝ = 1

tactic: simpa only [opow_zero] using H 0 l.pos
state_before: a b : Ordinal
l : IsLimit b
IH : ∀ (o' : Ordinal), o' < b → 1 ^ o' = 1
c : Ordinal
H : ∀ (b' : Ordinal), b' < b → 1 ^ b' ≤ c
⊢ 1 ≤ c

tactic: rwa [IH _ h]
state_before: a b : Ordinal
l : IsLimit b
IH : ∀ (o' : Ordinal), o' < b → 1 ^ o' = 1
c : Ordinal
H : 1 ≤ c
b' : Ordinal
h : b' < b
⊢ 1 ^ b' ≤ c
Theorem: MvPolynomial.totalDegree_X
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: rw [totalDegree, support_X]
state_before: R✝ : Type u
S : Type v
σ : Type u_2
τ : Type ?u.396116
r : R✝
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝² : CommSemiring R✝
p q : MvPolynomial σ R✝
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
s : σ
⊢ totalDegree (X s) = 1

tactic: simp only [Finset.sup, Finsupp.sum_single_index, Finset.fold_singleton, sup_bot_eq]
state_before: R✝ : Type u
S : Type v
σ : Type u_2
τ : Type ?u.396116
r : R✝
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝² : CommSemiring R✝
p q : MvPolynomial σ R✝
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
s : σ
⊢ (Finset.sup {Finsupp.single s 1} fun s => sum s fun x e => e) = 1
Theorem: Finset.Set.Sized.card_le
File: Mathlib/Data/Finset/Slice.lean

tactic: rw [Fintype.card, ← card_powersetLen]
state_before: α : Type u_1
ι : Sort ?u.4153
κ : ι → Sort ?u.4158
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) r

tactic: exact card_le_of_subset (subset_powersetLen_univ_iff.mpr h𝒜)
state_before: α : Type u_1
ι : Sort ?u.4153
κ : ι → Sort ?u.4158
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ card 𝒜 ≤ card (powersetLen r univ)
Theorem: ContDiffWithinAt.dist
File: Mathlib/Analysis/InnerProductSpace/Calculus.lean

tactic: simp only [dist_eq_norm]
state_before: 𝕜 : Type ?u.282045
E : Type u_2
F : Type ?u.282051
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : NormedSpace ℝ E
G : Type u_1
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
f g : G → E
f' g' : G →L[ℝ] E
s : Set G
x : G
n : ℕ∞
hf : ContDiffWithinAt ℝ n f s x
hg : ContDiffWithinAt ℝ n g s x
hne : f x ≠ g x
⊢ ContDiffWithinAt ℝ n (fun y => Dist.dist (f y) (g y)) s x

tactic: exact (hf.sub hg).norm 𝕜 (sub_ne_zero.2 hne)
state_before: 𝕜 : Type ?u.282045
E : Type u_2
F : Type ?u.282051
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : NormedSpace ℝ E
G : Type u_1
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
f g : G → E
f' g' : G →L[ℝ] E
s : Set G
x : G
n : ℕ∞
hf : ContDiffWithinAt ℝ n f s x
hg : ContDiffWithinAt ℝ n g s x
hne : f x ≠ g x
⊢ ContDiffWithinAt ℝ n (fun y => ‖f y - g y‖) s x
Theorem: algebraicIndependent_of_finite
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: simp
state_before: ι : Type ?u.745808
ι' : Type ?u.745811
R : Type u_2
K : Type ?u.745817
A : Type u_1
A' : Type ?u.745823
A'' : Type ?u.745826
V : Type u
V' : Type ?u.745831
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
s : Set A
H : ∀ (t : Set A), t ⊆ s → Set.Finite t → AlgebraicIndependent R Subtype.val
p : MvPolynomial A R
hp : p ∈ supported R s
⊢ p ∈ supported R ↑(vars p)
Theorem: Filter.eq_top_of_neBot
File: Mathlib/Order/Filter/Basic.lean

tactic: refine' top_unique fun s hs => _
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.91776
ι : Sort x
f g : Filter α
s t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
⊢ l = ⊤

tactic: obtain rfl : s = univ
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.91776
ι : Sort x
f g : Filter α
s✝ t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
s : Set α
hs : s ∈ l
⊢ s ∈ ⊤

tactic: exact Subsingleton.eq_univ_of_nonempty (nonempty_of_mem hs)
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.91776
ι : Sort x
f g : Filter α
s✝ t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
s : Set α
hs : s ∈ l
⊢ s = univ

α : Type u
β : Type v
γ : Type w
δ : Type ?u.91776
ι : Sort x
f g : Filter α
s t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
hs : univ ∈ l
⊢ univ ∈ ⊤

tactic: exact univ_mem
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.91776
ι : Sort x
f g : Filter α
s t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
hs : univ ∈ l
⊢ univ ∈ ⊤
Theorem: TensorAlgebra.algebraMap_leftInverse
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

tactic: simp [algebraMapInv]
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : R
⊢ ↑algebraMapInv (↑(algebraMap R (TensorAlgebra R M)) x) = x
Theorem: kstar_le_of_mul_le_left
File: Mathlib/Algebra/Order/Kleene.lean

tactic: simpa using mul_kstar_le hb
state_before: α : Type u_1
β : Type ?u.34264
ι : Type ?u.34267
π : ι → Type ?u.34272
inst✝ : KleeneAlgebra α
a b c : α
hb : 1 ≤ b
⊢ b * a ≤ b → a∗ ≤ b
Theorem: Polynomial.trinomial_mirror
File: Mathlib/Data/Polynomial/UnitTrinomial.lean

tactic: rw [mirror, trinomial_natTrailingDegree hkm hmn hu, reverse, trinomial_natDegree hkm hmn hw,
  trinomial_def, reflect_add, reflect_add, reflect_C_mul_X_pow, reflect_C_mul_X_pow,
  reflect_C_mul_X_pow, revAt_le (hkm.trans hmn).le, revAt_le hmn.le, revAt_le le_rfl, add_mul,
  add_mul, mul_assoc, mul_assoc, mul_assoc, ← pow_add, ← pow_add, ← pow_add,
  Nat.sub_add_cancel (hkm.trans hmn).le, Nat.sub_self, zero_add, add_comm, add_comm (C u * X ^ n),
  ← add_assoc, ← trinomial_def]
state_before: R : Type u_1
inst✝ : Semiring R
k m n : ℕ
u v w : R
hkm : k < m
hmn : m < n
hu : u ≠ 0
hw : w ≠ 0
⊢ mirror (trinomial k m n u v w) = trinomial k (n - m + k) n w v u
Theorem: Complex.abs_le_sqrt_two_mul_max
File: Mathlib/Data/Complex/Basic.lean

tactic: cases' z with x y
state_before: z : ℂ
⊢ ↑abs z ≤ Real.sqrt 2 * max (Abs.abs z.re) (Abs.abs z.im)

tactic: simp only [abs_apply, normSq_mk, ← sq]
state_before: case mk
x y : ℝ
⊢ ↑abs { re := x, im := y } ≤ Real.sqrt 2 * max (Abs.abs { re := x, im := y }.re) (Abs.abs { re := x, im := y }.im)

tactic: by_cases hle : |x| ≤ |y|
state_before: case mk
x y : ℝ
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)

tactic: calc
  Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt (y ^ 2 + y ^ 2) :=
    Real.sqrt_le_sqrt (add_le_add_right (sq_le_sq.2 hle) _)
  _ = Real.sqrt 2 * max (|x|) (|y|) := by
    rw [max_eq_right hle, ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: case pos
x y : ℝ
hle : Abs.abs x ≤ Abs.abs y
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)

tactic: rw [max_eq_right hle, ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: x y : ℝ
hle : Abs.abs x ≤ Abs.abs y
⊢ Real.sqrt (y ^ 2 + y ^ 2) = Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)

tactic: have hle' := le_of_not_le hle
state_before: case neg
x y : ℝ
hle : ¬Abs.abs x ≤ Abs.abs y
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)

tactic: rw [add_comm]
state_before: case neg
x y : ℝ
hle : ¬Abs.abs x ≤ Abs.abs y
hle' : Abs.abs y ≤ Abs.abs x
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)

tactic: calc
  Real.sqrt (y ^ 2 + x ^ 2) ≤ Real.sqrt (x ^ 2 + x ^ 2) :=
    Real.sqrt_le_sqrt (add_le_add_right (sq_le_sq.2 hle') _)
  _ = Real.sqrt 2 * max (|x|) (|y|) := by
    rw [max_eq_left hle', ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: case neg
x y : ℝ
hle : ¬Abs.abs x ≤ Abs.abs y
hle' : Abs.abs y ≤ Abs.abs x
⊢ Real.sqrt (y ^ 2 + x ^ 2) ≤ Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)

tactic: rw [max_eq_left hle', ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: x y : ℝ
hle : ¬Abs.abs x ≤ Abs.abs y
hle' : Abs.abs y ≤ Abs.abs x
⊢ Real.sqrt (x ^ 2 + x ^ 2) = Real.sqrt 2 * max (Abs.abs x) (Abs.abs y)
Theorem: Fin.add_zero
File: Mathlib/Data/Fin/Basic.lean

tactic: simp [eq_iff_veq, add_def, mod_eq_of_lt (is_lt k)]
state_before: n m : ℕ
inst✝ : NeZero n
k : Fin n
⊢ k + 0 = k
Theorem: Equiv.natSumNatEquivNat_apply
File: Mathlib/Logic/Equiv/Nat.lean

tactic: ext (x | x) <;> rfl
state_before: α : Type ?u.747
⊢ ↑natSumNatEquivNat = Sum.elim bit0 bit1
Theorem: BilinForm.isSkewAdjoint_bracket
File: Mathlib/Algebra/Lie/SkewAdjoint.lean

tactic: rw [mem_skewAdjointSubmodule] at *
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : f ∈ skewAdjointSubmodule B
hg : g ∈ skewAdjointSubmodule B
⊢ ⁅f, g⁆ ∈ skewAdjointSubmodule B

tactic: have hfg : IsAdjointPair B B (f * g) (g * f) := by rw [← neg_mul_neg g f]; exact hf.mul hg
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
⊢ IsSkewAdjoint B ⁅f, g⁆

tactic: have hgf : IsAdjointPair B B (g * f) (f * g) := by rw [← neg_mul_neg f g]; exact hg.mul hf
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
hfg : IsAdjointPair B B (f * g) (g * f)
⊢ IsSkewAdjoint B ⁅f, g⁆

tactic: change BilinForm.IsAdjointPair B B (f * g - g * f) (-(f * g - g * f))
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
hfg : IsAdjointPair B B (f * g) (g * f)
hgf : IsAdjointPair B B (g * f) (f * g)
⊢ IsSkewAdjoint B ⁅f, g⁆

tactic: rw [neg_sub]
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
hfg : IsAdjointPair B B (f * g) (g * f)
hgf : IsAdjointPair B B (g * f) (f * g)
⊢ IsAdjointPair B B (f * g - g * f) (-(f * g - g * f))

tactic: exact hfg.sub hgf
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
hfg : IsAdjointPair B B (f * g) (g * f)
hgf : IsAdjointPair B B (g * f) (f * g)
⊢ IsAdjointPair B B (f * g - g * f) (g * f - f * g)

tactic: rw [← neg_mul_neg g f]
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
⊢ IsAdjointPair B B (f * g) (g * f)

tactic: exact hf.mul hg
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
⊢ IsAdjointPair B B (f * g) (-g * -f)

tactic: rw [← neg_mul_neg f g]
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
hfg : IsAdjointPair B B (f * g) (g * f)
⊢ IsAdjointPair B B (g * f) (f * g)

tactic: exact hg.mul hf
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
B : BilinForm R M
f g : Module.End R M
hf : IsSkewAdjoint B f
hg : IsSkewAdjoint B g
hfg : IsAdjointPair B B (f * g) (g * f)
⊢ IsAdjointPair B B (g * f) (-f * -g)
Theorem: CategoryTheory.Limits.KernelFork.condition
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: erw [Fork.condition, HasZeroMorphisms.comp_zero]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
s : KernelFork f
⊢ Fork.ι s ≫ f = 0
Theorem: isUnit_gcd_of_eq_mul_gcd
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: rw [← associated_one_iff_isUnit]
state_before: α✝ : Type ?u.198677
inst✝² : CancelCommMonoidWithZero α✝
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
x y x' y' : α
ex : x = gcd x y * x'
ey : y = gcd x y * y'
h : gcd x y ≠ 0
⊢ IsUnit (gcd x' y')

tactic: refine' Associated.of_mul_left _ (Associated.refl <| gcd x y) h
state_before: α✝ : Type ?u.198677
inst✝² : CancelCommMonoidWithZero α✝
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
x y x' y' : α
ex : x = gcd x y * x'
ey : y = gcd x y * y'
h : gcd x y ≠ 0
⊢ Associated (gcd x' y') 1

tactic: convert (gcd_mul_left' (gcd x y) x' y').symm using 1
state_before: α✝ : Type ?u.198677
inst✝² : CancelCommMonoidWithZero α✝
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
x y x' y' : α
ex : x = gcd x y * x'
ey : y = gcd x y * y'
h : gcd x y ≠ 0
⊢ Associated (gcd x y * gcd x' y') (gcd x y * 1)

tactic: rw [← ex, ← ey, mul_one]
state_before: case h.e'_4
α✝ : Type ?u.198677
inst✝² : CancelCommMonoidWithZero α✝
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
x y x' y' : α
ex : x = gcd x y * x'
ey : y = gcd x y * y'
h : gcd x y ≠ 0
⊢ gcd x y * 1 = gcd (gcd x y * x') (gcd x y * y')
Theorem: IsChain.succ
File: Mathlib/Order/Chain.lean

tactic: rw [exists_and_left] at h
state_before: α : Type u_1
β : Type ?u.8171
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a b x y : α
hs : IsChain r s
h : ¬∃ t, IsChain r s ∧ SuperChain r s t
⊢ IsChain r (SuccChain r s)

tactic: simpa [SuccChain, dif_neg, h] using hs
state_before: α : Type u_1
β : Type ?u.8171
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a b x y : α
hs : IsChain r s
h : ¬(IsChain r s ∧ ∃ x, SuperChain r s x)
⊢ IsChain r (SuccChain r s)
Theorem: MeasureTheory.IsFundamentalDomain.integral_eq_tsum_of_ac
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

tactic: rw [← MeasureTheory.integral_sum_measure, h.sum_restrict_of_ac hν]
state_before: G : Type u_1
H : Type ?u.349531
α : Type u_2
β : Type ?u.349537
E : Type u_3
inst✝¹² : Group G
inst✝¹¹ : Group H
inst✝¹⁰ : MulAction G α
inst✝⁹ : MeasurableSpace α
inst✝⁸ : MulAction H β
inst✝⁷ : MeasurableSpace β
inst✝⁶ : NormedAddCommGroup E
s t : Set α
μ : Measure α
inst✝⁵ : MeasurableSpace G
inst✝⁴ : MeasurableSMul G α
inst✝³ : SMulInvariantMeasure G α μ
inst✝² : Countable G
ν : Measure α
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
h : IsFundamentalDomain G s
hν : ν ≪ μ
f : α → E
hf : Integrable f
⊢ (∫ (x : α), f x ∂ν) = ∑' (g : G), ∫ (x : α) in g • s, f x ∂ν

tactic: rw [h.sum_restrict_of_ac hν]
state_before: G : Type u_1
H : Type ?u.349531
α : Type u_2
β : Type ?u.349537
E : Type u_3
inst✝¹² : Group G
inst✝¹¹ : Group H
inst✝¹⁰ : MulAction G α
inst✝⁹ : MeasurableSpace α
inst✝⁸ : MulAction H β
inst✝⁷ : MeasurableSpace β
inst✝⁶ : NormedAddCommGroup E
s t : Set α
μ : Measure α
inst✝⁵ : MeasurableSpace G
inst✝⁴ : MeasurableSMul G α
inst✝³ : SMulInvariantMeasure G α μ
inst✝² : Countable G
ν : Measure α
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
h : IsFundamentalDomain G s
hν : ν ≪ μ
f : α → E
hf : Integrable f
⊢ Integrable fun x => f x

tactic: exact hf
state_before: G : Type u_1
H : Type ?u.349531
α : Type u_2
β : Type ?u.349537
E : Type u_3
inst✝¹² : Group G
inst✝¹¹ : Group H
inst✝¹⁰ : MulAction G α
inst✝⁹ : MeasurableSpace α
inst✝⁸ : MulAction H β
inst✝⁷ : MeasurableSpace β
inst✝⁶ : NormedAddCommGroup E
s t : Set α
μ : Measure α
inst✝⁵ : MeasurableSpace G
inst✝⁴ : MeasurableSMul G α
inst✝³ : SMulInvariantMeasure G α μ
inst✝² : Countable G
ν : Measure α
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
h : IsFundamentalDomain G s
hν : ν ≪ μ
f : α → E
hf : Integrable f
⊢ Integrable fun x => f x
Theorem: MeasureTheory.Integrable.sub
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simpa only [sub_eq_add_neg] using hf.add hg.neg
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.952095
δ : Type ?u.952098
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f
hg : Integrable g
⊢ Integrable (f - g)