@@ -391,6 +391,10 @@ lemma coeff_smul (f : mv_power_series σ R) (n) (a : R) :
391
391
coeff _ n (a • f) = a * coeff _ n f :=
392
392
rfl
393
393
394
+ lemma smul_eq_C_mul (f : mv_power_series σ R) (a : R) :
395
+ a • f = C σ R a * f :=
396
+ by { ext, simp }
397
+
394
398
lemma X_inj [nontrivial R] {s t : σ} : (X s : mv_power_series σ R) = X t ↔ s = t :=
395
399
⟨begin
396
400
intro h, replace h := congr_arg (coeff R (single s 1 )) h, rw [coeff_X, if_pos rfl, coeff_X] at h,
@@ -703,7 +707,10 @@ lemma inv_eq_zero {φ : mv_power_series σ k} :
703
707
φ⁻¹ = 0 ↔ constant_coeff σ k φ = 0 :=
704
708
⟨λ h, by simpa using congr_arg (constant_coeff σ k) h,
705
709
λ h, ext $ λ n, by { rw coeff_inv, split_ifs;
706
- simp only [h, mv_power_series.coeff_zero, zero_mul, inv_zero, neg_zero] }⟩
710
+ simp only [h, mv_power_series.coeff_zero, zero_mul, inv_zero, neg_zero] }⟩
711
+
712
+ @[simp] lemma zero_inv : (0 : mv_power_series σ k)⁻¹ = 0 :=
713
+ by rw [inv_eq_zero, constant_coeff_zero]
707
714
708
715
@[simp, priority 1100 ]
709
716
lemma inv_of_unit_eq (φ : mv_power_series σ k) (h : constant_coeff σ k φ ≠ 0 ) :
@@ -717,19 +724,19 @@ begin
717
724
congr' 1 , rw [units.ext_iff], exact h.symm,
718
725
end
719
726
720
- @[simp] protected lemma mul_inv (φ : mv_power_series σ k) (h : constant_coeff σ k φ ≠ 0 ) :
727
+ @[simp] protected lemma mul_inv_cancel (φ : mv_power_series σ k) (h : constant_coeff σ k φ ≠ 0 ) :
721
728
φ * φ⁻¹ = 1 :=
722
729
by rw [← inv_of_unit_eq φ h, mul_inv_of_unit φ (units.mk0 _ h) rfl]
723
730
724
- @[simp] protected lemma inv_mul (φ : mv_power_series σ k) (h : constant_coeff σ k φ ≠ 0 ) :
731
+ @[simp] protected lemma inv_mul_cancel (φ : mv_power_series σ k) (h : constant_coeff σ k φ ≠ 0 ) :
725
732
φ⁻¹ * φ = 1 :=
726
- by rw [mul_comm, φ.mul_inv h]
733
+ by rw [mul_comm, φ.mul_inv_cancel h]
727
734
728
735
protected lemma eq_mul_inv_iff_mul_eq {φ₁ φ₂ φ₃ : mv_power_series σ k}
729
736
(h : constant_coeff σ k φ₃ ≠ 0 ) :
730
737
φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂ :=
731
- ⟨λ k, by simp [k, mul_assoc, mv_power_series.inv_mul _ h],
732
- λ k, by simp [← k, mul_assoc, mv_power_series.mul_inv _ h]⟩
738
+ ⟨λ k, by simp [k, mul_assoc, mv_power_series.inv_mul_cancel _ h],
739
+ λ k, by simp [← k, mul_assoc, mv_power_series.mul_inv_cancel _ h]⟩
733
740
734
741
protected lemma eq_inv_iff_mul_eq_one {φ ψ : mv_power_series σ k} (h : constant_coeff σ k ψ ≠ 0 ) :
735
742
φ = ψ⁻¹ ↔ φ * ψ = 1 :=
@@ -739,6 +746,39 @@ protected lemma inv_eq_iff_mul_eq_one {φ ψ : mv_power_series σ k} (h : consta
739
746
ψ⁻¹ = φ ↔ φ * ψ = 1 :=
740
747
by rw [eq_comm, mv_power_series.eq_inv_iff_mul_eq_one h]
741
748
749
+ @[simp] protected lemma mul_inv_rev (φ ψ : mv_power_series σ k) :
750
+ (φ * ψ)⁻¹ = ψ⁻¹ * φ⁻¹ :=
751
+ begin
752
+ by_cases h : constant_coeff σ k (φ * ψ) = 0 ,
753
+ { rw inv_eq_zero.mpr h,
754
+ simp only [map_mul, mul_eq_zero] at h,
755
+ -- we don't have `no_zero_divisors (mw_power_series σ k)` yet,
756
+ cases h;
757
+ simp [inv_eq_zero.mpr h] },
758
+ { rw [mv_power_series.inv_eq_iff_mul_eq_one h],
759
+ simp only [not_or_distrib, map_mul, mul_eq_zero] at h,
760
+ rw [←mul_assoc, mul_assoc _⁻¹, mv_power_series.inv_mul_cancel _ h.left, mul_one,
761
+ mv_power_series.inv_mul_cancel _ h.right] }
762
+ end
763
+
764
+ @[simp] lemma one_inv : (1 : mv_power_series σ k)⁻¹ = 1 :=
765
+ by { rw [mv_power_series.inv_eq_iff_mul_eq_one, mul_one], simp }
766
+
767
+ @[simp] lemma C_inv (r : k) : (C σ k r)⁻¹ = C σ k r⁻¹ :=
768
+ begin
769
+ rcases eq_or_ne r 0 with rfl|hr,
770
+ { simp },
771
+ rw [mv_power_series.inv_eq_iff_mul_eq_one, ←map_mul, inv_mul_cancel hr, map_one],
772
+ simpa using hr
773
+ end
774
+
775
+ @[simp] lemma X_inv (s : σ) : (X s : mv_power_series σ k)⁻¹ = 0 :=
776
+ by rw [inv_eq_zero, constant_coeff_X]
777
+
778
+ @[simp] lemma smul_inv (r : k) (φ : mv_power_series σ k) :
779
+ (r • φ)⁻¹ = r⁻¹ • φ⁻¹ :=
780
+ by simp [smul_eq_C_mul, mul_comm]
781
+
742
782
end field
743
783
744
784
end mv_power_series
@@ -1050,6 +1090,10 @@ mv_power_series.coeff_C_mul _ φ a
1050
1090
(n : ℕ) (φ : power_series S) (a : R) : coeff S n (a • φ) = a • coeff S n φ :=
1051
1091
rfl
1052
1092
1093
+ lemma smul_eq_C_mul (f : power_series R) (a : R) :
1094
+ a • f = C R a * f :=
1095
+ by { ext, simp }
1096
+
1053
1097
@[simp] lemma coeff_succ_mul_X (n : ℕ) (φ : power_series R) :
1054
1098
coeff R (n+1 ) (φ * X) = coeff R n φ :=
1055
1099
begin
@@ -1504,6 +1548,8 @@ lemma inv_eq_zero {φ : power_series k} :
1504
1548
φ⁻¹ = 0 ↔ constant_coeff k φ = 0 :=
1505
1549
mv_power_series.inv_eq_zero
1506
1550
1551
+ @[simp] lemma zero_inv : (0 : power_series k)⁻¹ = 0 := mv_power_series.zero_inv
1552
+
1507
1553
@[simp, priority 1100 ] lemma inv_of_unit_eq (φ : power_series k) (h : constant_coeff k φ ≠ 0 ) :
1508
1554
inv_of_unit φ (units.mk0 _ h) = φ⁻¹ :=
1509
1555
mv_power_series.inv_of_unit_eq _ _
@@ -1512,13 +1558,13 @@ mv_power_series.inv_of_unit_eq _ _
1512
1558
inv_of_unit φ u = φ⁻¹ :=
1513
1559
mv_power_series.inv_of_unit_eq' φ _ h
1514
1560
1515
- @[simp] protected lemma mul_inv (φ : power_series k) (h : constant_coeff k φ ≠ 0 ) :
1561
+ @[simp] protected lemma mul_inv_cancel (φ : power_series k) (h : constant_coeff k φ ≠ 0 ) :
1516
1562
φ * φ⁻¹ = 1 :=
1517
- mv_power_series.mul_inv φ h
1563
+ mv_power_series.mul_inv_cancel φ h
1518
1564
1519
- @[simp] protected lemma inv_mul (φ : power_series k) (h : constant_coeff k φ ≠ 0 ) :
1565
+ @[simp] protected lemma inv_mul_cancel (φ : power_series k) (h : constant_coeff k φ ≠ 0 ) :
1520
1566
φ⁻¹ * φ = 1 :=
1521
- mv_power_series.inv_mul φ h
1567
+ mv_power_series.inv_mul_cancel φ h
1522
1568
1523
1569
lemma eq_mul_inv_iff_mul_eq {φ₁ φ₂ φ₃ : power_series k} (h : constant_coeff k φ₃ ≠ 0 ) :
1524
1570
φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂ :=
@@ -1532,6 +1578,23 @@ lemma inv_eq_iff_mul_eq_one {φ ψ : power_series k} (h : constant_coeff k ψ
1532
1578
ψ⁻¹ = φ ↔ φ * ψ = 1 :=
1533
1579
mv_power_series.inv_eq_iff_mul_eq_one h
1534
1580
1581
+ @[simp] protected lemma mul_inv_rev (φ ψ : power_series k) :
1582
+ (φ * ψ)⁻¹ = ψ⁻¹ * φ⁻¹ :=
1583
+ mv_power_series.mul_inv_rev _ _
1584
+
1585
+ @[simp] lemma one_inv : (1 : power_series k)⁻¹ = 1 :=
1586
+ mv_power_series.one_inv
1587
+
1588
+ @[simp] lemma C_inv (r : k) : (C k r)⁻¹ = C k r⁻¹ :=
1589
+ mv_power_series.C_inv _
1590
+
1591
+ @[simp] lemma X_inv : (X : power_series k)⁻¹ = 0 :=
1592
+ mv_power_series.X_inv _
1593
+
1594
+ @[simp] lemma smul_inv (r : k) (φ : power_series k) :
1595
+ (r • φ)⁻¹ = r⁻¹ • φ⁻¹ :=
1596
+ mv_power_series.smul_inv _ _
1597
+
1535
1598
end field
1536
1599
1537
1600
end power_series
@@ -1836,6 +1899,8 @@ by rw [bit1, bit1, coe_add, coe_one, coe_bit0]
1836
1899
((X : polynomial R) : power_series R) = power_series.X :=
1837
1900
coe_monomial _ _
1838
1901
1902
+ @[simp] lemma constant_coeff_coe : power_series.constant_coeff R φ = φ.coeff 0 := rfl
1903
+
1839
1904
variables (R)
1840
1905
1841
1906
lemma coe_injective : function.injective (coe : polynomial R → power_series R) :=
0 commit comments