Skip to content

Commit a5c8b9e

Browse files
committed
random tidying of example file
1 parent 21b1db8 commit a5c8b9e

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

FLT/AutomorphicRepresentation/Example.lean

+4-14
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,11 @@ instance : DFunLike ZHat ℕ+ (fun (N : ℕ+) ↦ ZMod N) where
4040
coe z := z.1
4141
coe_injective' M N := by simp_all
4242

43-
-- Try to avoid introducing `z.1` and `z.2`.
44-
-- @[simp]
45-
-- lemma val_apply (z : ZHat) (n : ℕ+) : z.1 n = z n := rfl
46-
4743
lemma prop (z : ZHat) (D N : ℕ+) (h : (D : ℕ) ∣ N) : ZMod.castHom h (ZMod D) (z N) = z D := z.2 ..
4844

4945
@[ext]
50-
lemma ext (x y : ZHat) (h : ∀ n : ℕ+, x n = y n) : x = y := by
51-
cases x
52-
cases y
53-
congr
54-
ext n
55-
apply h
46+
lemma ext (x y : ZHat) (h : ∀ n : ℕ+, x n = y n) : x = y :=
47+
Subtype.ext <| funext <| h
5648

5749
@[simp] lemma zero_val (n : ℕ+) : (0 : ZHat) n = 0 := rfl
5850
@[simp] lemma one_val (n : ℕ+) : (1 : ZHat) n = 1 := rfl
@@ -79,12 +71,10 @@ instance charZero : CharZero ZHat := ⟨ fun a b h ↦ by
7971
· simp [Nat.succ_eq_add_one, Nat.lt_add_one_iff]
8072
· simp [Nat.succ_eq_add_one, Nat.lt_add_one_iff]
8173
82-
--lemma NonAssocSemiring.Nontrivial_iff (R : Type) [NonAssocSemiring R] :
83-
-- Nontrivial R ↔ (0 : R) ≠ 1 :=
84-
-- ⟨fun _ ↦ zero_ne_one' R, fun a ↦ ⟨0, 1, a⟩⟩
8574

8675
open BigOperators Nat Finset in
87-
/-- A nonarchimedean analogue $0! + 1! + 2! + \cdots$ of $e=1/0! + 1/1! + 1/2! + \cdots$. -/
76+
/-- A nonarchimedean analogue `0! + 1! + 2! + ⋯` of `e = 1/0! + 1/1! + 1/2! + ⋯`.
77+
It is defined as the function whose value at `ZMod n` is the sum of `i!` for `0 ≤ i < n`.-/
8878
def e : ZHat := ⟨fun (n : ℕ+) ↦ ∑ i in range (n : ℕ), i !, by
8979
intros D N hDN
9080
dsimp only

0 commit comments

Comments
 (0)