-
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
f1fd25b
commit d93d008
Showing
15 changed files
with
255 additions
and
83 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,3 @@ | ||
import Mathlib.Algebra.Group.Subgroup.Basic | ||
|
||
attribute [simp] AddMonoidHom.mem_ker |
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import Mathlib.Algebra.Order.GroupWithZero.Unbundled | ||
|
||
/-! | ||
# TODO | ||
Rename `one_le_mul_of_one_le_of_one_le` to `one_le_mul₀` | ||
-/ | ||
|
||
variable {G₀ : Type*} [GroupWithZero G₀] [PartialOrder G₀] [ZeroLEOneClass G₀] [PosMulReflectLT G₀] | ||
{a b : G₀} [PosMulMono G₀] | ||
|
||
-- TODO: Unify with `le_inv` | ||
lemma le_inv_comm₀ (ha : 0 < a) (hb : 0 < b) : a ≤ b⁻¹ ↔ b ≤ a⁻¹ := sorry |
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,4 @@ | ||
import Mathlib.Algebra.Order.Ring.Cast | ||
|
||
@[gcongr] protected alias ⟨_, GCongr.intCast_mono⟩ := Int.cast_le | ||
@[gcongr] protected alias ⟨_, GCongr.intCast_strictMono⟩ := Int.cast_lt |
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,32 @@ | ||
import Mathlib.Data.ENNReal.Basic | ||
|
||
namespace ENNReal | ||
|
||
@[simp] lemma ofNat_pos {n : ℕ} [n.AtLeastTwo] : 0 < (no_index OfNat.ofNat n : ℝ≥0∞) := | ||
Nat.cast_pos.2 Fin.size_pos' | ||
|
||
end ENNReal | ||
|
||
namespace Mathlib.Meta.Positivity | ||
open Lean Meta Qq Function ENNReal | ||
|
||
private lemma ennreal_one_pos : (0 : ℝ≥0∞) < 1 := zero_lt_one | ||
|
||
/-- The `positivity` extension which identifies expressions of the form `‖f‖_[p]`. -/ | ||
@[positivity OfNat.ofNat _] def evalOfNatENNReal : PositivityExt where eval {u} α _z _p e := do | ||
match u, α, e with | ||
| 0, ~q(ℝ≥0∞), ~q(@OfNat.ofNat _ $n $instn) => | ||
try | ||
let instn ← synthInstanceQ q(Nat.AtLeastTwo $n) | ||
return Strictness.positive (q(@ofNat_pos $n $instn) : Expr) | ||
catch _ => do | ||
match n with | ||
| ~q(1) => return .positive (q(ennreal_one_pos) : Expr) | ||
| _ => throwError "not positive" | ||
| _ => throwError "not `ENNReal`-valued `ofNat`" | ||
|
||
end Mathlib.Meta.Positivity | ||
|
||
open scoped ENNReal | ||
|
||
example : (0 : ℝ≥0∞) < 1 := by positivity |
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,8 @@ | ||
import Mathlib.Data.ZMod.Module | ||
|
||
namespace AddSubgroup | ||
variable {n : ℕ} {M : Type*} [AddCommGroup M] [Module (ZMod n) M] {S : AddSubgroup M} {x : M} | ||
|
||
@[simp] lemma mem_toZModSubmodule : x ∈ toZModSubmodule n S ↔ x ∈ S := .rfl | ||
|
||
end AddSubgroup |
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,6 @@ | ||
import Mathlib.Order.CompleteLattice | ||
|
||
variable {α : Type*} [CompleteLattice α] | ||
|
||
lemma iSup_le_iSup_of_imp {p q : Prop} {a : α} (h : p → q) : ⨆ _h : p, a ≤ ⨆ _h : q, a := by aesop | ||
lemma iInf_le_iInf_of_imp {p q : Prop} {a : α} (h : p → q) : ⨅ _h : q, a ≤ ⨅ _h : p, a := by aesop |
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,3 @@ | ||
import Mathlib.Order.Hom.Basic | ||
|
||
@[gcongr] protected alias ⟨_, GCongr.orderIso_apply_le_apply⟩ := OrderIso.le_iff_le |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import LeanAPAP.Prereqs.Expect.Basic | ||
import LeanAPAP.Prereqs.Function.Indicator.Defs | ||
import LeanAPAP.Prereqs.Inner.Discrete.Defs | ||
|
||
open Finset MeasureTheory | ||
open scoped BigOperators ComplexConjugate | ||
|
||
variable {α R : Type*} [Fintype α] [DecidableEq α] | ||
|
||
section CommSemiring | ||
variable [CommSemiring R] [StarRing R] | ||
|
||
lemma indicate_dL2Inner (s : Finset α) (f : α → R) : ⟪𝟭 s, f⟫_[R] = ∑ i ∈ s, f i := by | ||
simp [dL2Inner, indicate_apply] | ||
|
||
lemma dL2Inner_indicate (f : α → R) (s : Finset α) : ⟪f, 𝟭 s⟫_[R] = ∑ i ∈ s, conj (f i) := by | ||
simp [dL2Inner, indicate_apply] | ||
|
||
end CommSemiring | ||
|
||
section Semifield | ||
variable [Semifield R] [CharZero R] [StarRing R] | ||
|
||
lemma mu_dL2Inner (s : Finset α) (f : α → R) : ⟪μ s, f⟫_[R] = 𝔼 i ∈ s, f i := by | ||
simp [dL2Inner, indicate_apply]; simp [mu_apply, expect_eq_sum_div_card, mul_sum, div_eq_inv_mul] | ||
|
||
lemma dL2Inner_mu (f : α → R) (s : Finset α) : ⟪f, μ s⟫_[R] = 𝔼 i ∈ s, conj (f i) := by | ||
simp [dL2Inner, indicate_apply]; simp [mu_apply, expect_eq_sum_div_card, sum_mul, div_eq_mul_inv] | ||
|
||
end Semifield |
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