-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e96b95
commit b46e98e
Showing
9 changed files
with
172 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Mathlib.Algebra.ModEq | ||
|
||
namespace AddCommGroup | ||
variable {α : Type*} | ||
|
||
section AddCommGroupWithOne | ||
variable [AddCommGroupWithOne α] [CharZero α] {a b : ℤ} {n : ℕ} | ||
|
||
@[simp, norm_cast] lemma intCast_modEq_intCast' : a ≡ b [PMOD (n : α)] ↔ a ≡ b [PMOD (n : ℤ)] := by | ||
simpa using int_cast_modEq_int_cast (α := α) (z := n) | ||
|
||
end AddCommGroupWithOne | ||
|
||
variable [DivisionRing α] {a b c p : α} | ||
|
||
@[simp] lemma div_modEq_div (hc : c ≠ 0) : a / c ≡ b / c [PMOD p] ↔ a ≡ b [PMOD (p * c)] := by | ||
simp [ModEq, ←sub_div, div_eq_iff hc, mul_assoc] | ||
|
||
end AddCommGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
LeanAPAP/Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Mathlib.Analysis.Convex.SpecificFunctions.Basic | ||
|
||
namespace Real | ||
|
||
lemma exp_le_cosh_add_mul_sinh {t : ℝ} (ht : |t| ≤ 1) (x : ℝ) : | ||
exp (t * x) ≤ cosh x + t * sinh x := by | ||
rw [abs_le] at ht | ||
calc | ||
_ = exp ((1 + t) / 2 * x + (1 - t) / 2 * (-x)) := by ring_nf | ||
_ ≤ (1 + t) / 2 * exp x + (1 - t) / 2 * exp (-x) := | ||
convexOn_exp.2 (Set.mem_univ _) (Set.mem_univ _) (by linarith) (by linarith) $ by ring | ||
_ = _ := by rw [cosh_eq, sinh_eq]; ring | ||
|
||
end Real |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters