Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit efae3d9

Browse files
committed
feat(data/mv_polynomial): C_inj and C_injective (#2920)
1 parent 607286e commit efae3d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/data/mv_polynomial.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ instance : is_semiring_hom (C : α → mv_polynomial σ α) :=
149149
map_add := λ a a', C_add,
150150
map_mul := λ a a', C_mul }
151151

152+
lemma C_injective (σ : Type*) (R : Type*) [comm_ring R] :
153+
function.injective (C : R → mv_polynomial σ R) :=
154+
finsupp.injective_single _
155+
156+
@[simp] lemma C_inj {σ : Type*} (R : Type*) [comm_ring R] (r s : R) :
157+
(C r : mv_polynomial σ R) = C s ↔ r = s :=
158+
(C_injective σ R).eq_iff
159+
152160
lemma C_eq_coe_nat (n : ℕ) : (C ↑n : mv_polynomial σ α) = n :=
153161
by induction n; simp [nat.succ_eq_add_one, *]
154162

0 commit comments

Comments
 (0)