fix(library): remove "-[notations]" hack at "open -[notations] algebra"
This commit is contained in:
parent
26eb6fa849
commit
724aacb2c1
26 changed files with 27 additions and 30 deletions
|
@ -8,7 +8,7 @@ Finite bags.
|
||||||
import data.nat data.list.perm algebra.binary
|
import data.nat data.list.perm algebra.binary
|
||||||
open nat quot list subtype binary function eq.ops
|
open nat quot list subtype binary function eq.ops
|
||||||
open [declarations] perm
|
open [declarations] perm
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
variable {A : Type}
|
variable {A : Type}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ Cardinality calculations for finite sets.
|
||||||
-/
|
-/
|
||||||
import .to_set .bigops data.set.function data.nat.power data.nat.bigops
|
import .to_set .bigops data.set.function data.nat.power data.nat.bigops
|
||||||
open nat nat.finset eq.ops
|
open nat nat.finset eq.ops
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace finset
|
namespace finset
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Author: Leonardo de Moura
|
||||||
-/
|
-/
|
||||||
import data.finset.card
|
import data.finset.card
|
||||||
open nat nat.finset decidable
|
open nat nat.finset decidable
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace finset
|
namespace finset
|
||||||
variable {A : Type}
|
variable {A : Type}
|
||||||
|
|
|
@ -7,7 +7,7 @@ Author : Haitao Zhang
|
||||||
import data
|
import data
|
||||||
|
|
||||||
open nat function eq.ops
|
open nat function eq.ops
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace list
|
namespace list
|
||||||
-- this is in preparation for counting the number of finite functions
|
-- this is in preparation for counting the number of finite functions
|
||||||
|
|
|
@ -10,9 +10,8 @@ we implement this module using a bijection from (finset nat) to nat, and
|
||||||
this bijection is implemeted using the Ackermann coding.
|
this bijection is implemeted using the Ackermann coding.
|
||||||
-/
|
-/
|
||||||
import data.nat data.finset.equiv data.list
|
import data.nat data.finset.equiv data.list
|
||||||
open nat binary
|
open nat binary algebra
|
||||||
open - [notations] finset
|
open - [notations] finset
|
||||||
open - [notations] algebra
|
|
||||||
|
|
||||||
definition hf := nat
|
definition hf := nat
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ Following SSReflect and the SMTlib standard, we define a mod b so that 0 ≤ a m
|
||||||
import data.int.order data.nat.div
|
import data.int.order data.nat.div
|
||||||
open [coercions] [reduce_hints] nat
|
open [coercions] [reduce_hints] nat
|
||||||
open [declarations] [classes] nat (succ)
|
open [declarations] [classes] nat (succ)
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
open eq.ops
|
open eq.ops
|
||||||
|
|
||||||
namespace int
|
namespace int
|
||||||
|
|
|
@ -8,7 +8,7 @@ and transfer the results.
|
||||||
-/
|
-/
|
||||||
import .basic algebra.ordered_ring
|
import .basic algebra.ordered_ring
|
||||||
open nat
|
open nat
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
open decidable
|
open decidable
|
||||||
open int eq.ops
|
open int eq.ops
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ The power function on the integers.
|
||||||
import data.int.basic data.int.order data.int.div algebra.group_power data.nat.power
|
import data.int.basic data.int.order data.int.div algebra.group_power data.nat.power
|
||||||
|
|
||||||
namespace int
|
namespace int
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
definition int_has_pow_nat [reducible] [instance] [priority int.prio] : has_pow_nat int :=
|
definition int_has_pow_nat [reducible] [instance] [priority int.prio] : has_pow_nat int :=
|
||||||
has_pow_nat.mk has_pow_nat.pow_nat
|
has_pow_nat.mk has_pow_nat.pow_nat
|
||||||
|
|
|
@ -7,7 +7,7 @@ Basic properties of lists.
|
||||||
-/
|
-/
|
||||||
import logic tools.helper_tactics data.nat.order
|
import logic tools.helper_tactics data.nat.order
|
||||||
open eq.ops helper_tactics nat prod function option
|
open eq.ops helper_tactics nat prod function option
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
inductive list (T : Type) : Type :=
|
inductive list (T : Type) : Type :=
|
||||||
| nil {} : list T
|
| nil {} : list T
|
||||||
|
|
|
@ -289,7 +289,7 @@ nat.cases_on n
|
||||||
... = succ (succ n' * m' + n') : add_succ)⁻¹
|
... = succ (succ n' * m' + n') : add_succ)⁻¹
|
||||||
!succ_ne_zero))
|
!succ_ne_zero))
|
||||||
|
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
protected definition comm_semiring [reducible] [trans_instance] : algebra.comm_semiring nat :=
|
protected definition comm_semiring [reducible] [trans_instance] : algebra.comm_semiring nat :=
|
||||||
⦃algebra.comm_semiring,
|
⦃algebra.comm_semiring,
|
||||||
add := nat.add,
|
add := nat.add,
|
||||||
|
|
|
@ -7,7 +7,7 @@ Definitions and properties of div and mod. Much of the development follows Isabe
|
||||||
-/
|
-/
|
||||||
import data.nat.sub
|
import data.nat.sub
|
||||||
open eq.ops well_founded decidable prod
|
open eq.ops well_founded decidable prod
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ Authors: Leonardo de Moura
|
||||||
Factorial
|
Factorial
|
||||||
-/
|
-/
|
||||||
import data.nat.div
|
import data.nat.div
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
definition fact : nat → nat
|
definition fact : nat → nat
|
||||||
|
|
|
@ -7,7 +7,7 @@ Definitions and properties of gcd, lcm, and coprime.
|
||||||
-/
|
-/
|
||||||
import .div
|
import .div
|
||||||
open eq.ops well_founded decidable prod
|
open eq.ops well_founded decidable prod
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ else (eq_max_left h) ▸ !le.refl
|
||||||
|
|
||||||
/- nat is an instance of a linearly ordered semiring and a lattice -/
|
/- nat is an instance of a linearly ordered semiring and a lattice -/
|
||||||
|
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
protected definition decidable_linear_ordered_semiring [reducible] [trans_instance] :
|
protected definition decidable_linear_ordered_semiring [reducible] [trans_instance] :
|
||||||
algebra.decidable_linear_ordered_semiring nat :=
|
algebra.decidable_linear_ordered_semiring nat :=
|
||||||
|
|
|
@ -7,7 +7,7 @@ Elegant pairing function.
|
||||||
-/
|
-/
|
||||||
import data.nat.sqrt data.nat.div
|
import data.nat.sqrt data.nat.div
|
||||||
open prod decidable
|
open prod decidable
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
definition mkpair (a b : nat) : nat :=
|
definition mkpair (a b : nat) : nat :=
|
||||||
|
|
|
@ -6,7 +6,7 @@ Authors: Leonardo de Moura, Jeremy Avigad
|
||||||
The power function on the natural numbers.
|
The power function on the natural numbers.
|
||||||
-/
|
-/
|
||||||
import data.nat.basic data.nat.order data.nat.div data.nat.gcd algebra.ring_power
|
import data.nat.basic data.nat.order data.nat.div data.nat.gcd algebra.ring_power
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import data.nat.order data.nat.sub
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
open decidable
|
open decidable
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
-- This is the simplest possible function that just performs a linear search
|
-- This is the simplest possible function that just performs a linear search
|
||||||
definition sqrt_aux : nat → nat → nat
|
definition sqrt_aux : nat → nat → nat
|
||||||
|
|
|
@ -289,7 +289,7 @@ sub.cases
|
||||||
... = k - n + n : sub_add_cancel H3,
|
... = k - n + n : sub_add_cancel H3,
|
||||||
le.intro (add.cancel_right H4))
|
le.intro (add.cancel_right H4))
|
||||||
|
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
theorem sub_pos_of_lt {m n : ℕ} (H : m < n) : n - m > 0 :=
|
theorem sub_pos_of_lt {m n : ℕ} (H : m < n) : n - m > 0 :=
|
||||||
assert H1 : n = n - m + m, from (sub_add_cancel (le_of_lt H))⁻¹,
|
assert H1 : n = n - m + m, from (sub_add_cancel (le_of_lt H))⁻¹,
|
||||||
|
|
|
@ -10,7 +10,7 @@ are those needed for that construction.
|
||||||
-/
|
-/
|
||||||
import data.rat.order data.nat
|
import data.rat.order data.nat
|
||||||
open nat rat subtype eq.ops
|
open nat rat subtype eq.ops
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace pnat
|
namespace pnat
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ The rational numbers as a field generated by the integers, defined as the usual
|
||||||
-/
|
-/
|
||||||
import data.int algebra.field
|
import data.int algebra.field
|
||||||
open int quot eq.ops
|
open int quot eq.ops
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
record prerat : Type :=
|
record prerat : Type :=
|
||||||
(num : ℤ) (denom : ℤ) (denom_pos : denom > 0)
|
(num : ℤ) (denom : ℤ) (denom_pos : denom > 0)
|
||||||
|
|
|
@ -7,7 +7,7 @@ Adds the ordering, and instantiates the rationals as an ordered field.
|
||||||
-/
|
-/
|
||||||
import data.int algebra.ordered_field algebra.group_power data.rat.basic
|
import data.int algebra.ordered_field algebra.group_power data.rat.basic
|
||||||
open quot eq.ops
|
open quot eq.ops
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
/- the ordering on representations -/
|
/- the ordering on representations -/
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ The construction of the reals is arranged in four files.
|
||||||
-/
|
-/
|
||||||
import data.nat data.rat.order data.pnat
|
import data.nat data.rat.order data.pnat
|
||||||
open nat eq pnat
|
open nat eq pnat
|
||||||
|
open algebra
|
||||||
open - [coercions] rat
|
open - [coercions] rat
|
||||||
open - [notations] algebra
|
|
||||||
|
|
||||||
local postfix `⁻¹` := pnat.inv
|
local postfix `⁻¹` := pnat.inv
|
||||||
local notation 0 := rat.of_num 0
|
local notation 0 := rat.of_num 0
|
||||||
|
|
|
@ -13,7 +13,7 @@ section Bezout
|
||||||
|
|
||||||
open nat int
|
open nat int
|
||||||
open eq.ops well_founded decidable prod
|
open eq.ops well_founded decidable prod
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
private definition pair_nat.lt : ℕ × ℕ → ℕ × ℕ → Prop := measure pr₂
|
private definition pair_nat.lt : ℕ × ℕ → ℕ × ℕ → Prop := measure pr₂
|
||||||
private definition pair_nat.lt.wf : well_founded pair_nat.lt := intro_k (measure.wf pr₂) 20
|
private definition pair_nat.lt.wf : well_founded pair_nat.lt := intro_k (measure.wf pr₂) 20
|
||||||
|
@ -92,8 +92,7 @@ implies prime (dvd_or_dvd_of_prime_of_dvd_mul).
|
||||||
-/
|
-/
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
open int
|
open int algebra
|
||||||
open - [notations] algebra
|
|
||||||
|
|
||||||
example {p x y : ℕ} (pp : prime p) (H : p ∣ x * y) : p ∣ x ∨ p ∣ y :=
|
example {p x y : ℕ} (pp : prime p) (H : p ∣ x * y) : p ∣ x ∨ p ∣ y :=
|
||||||
decidable.by_cases
|
decidable.by_cases
|
||||||
|
|
|
@ -7,7 +7,7 @@ A proof that if n > 1 and a > 0, then the nth root of a is irrational, unless a
|
||||||
-/
|
-/
|
||||||
import data.rat .prime_factorization
|
import data.rat .prime_factorization
|
||||||
open eq.ops
|
open eq.ops
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
/- First, a textbook proof that sqrt 2 is irrational. -/
|
/- First, a textbook proof that sqrt 2 is irrational. -/
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Multiplicity and prime factors. We have:
|
||||||
-/
|
-/
|
||||||
import data.nat data.finset .primes
|
import data.nat data.finset .primes
|
||||||
open eq.ops finset well_founded decidable nat.finset
|
open eq.ops finset well_founded decidable nat.finset
|
||||||
open - [notations] algebra
|
open algebra
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@ Authors: Leonardo de Moura, Jeremy Avigad
|
||||||
Prime numbers.
|
Prime numbers.
|
||||||
-/
|
-/
|
||||||
import data.nat logic.identities
|
import data.nat logic.identities
|
||||||
open bool
|
open bool algebra
|
||||||
open - [notations] algebra
|
|
||||||
|
|
||||||
namespace nat
|
namespace nat
|
||||||
open decidable
|
open decidable
|
||||||
|
|
Loading…
Reference in a new issue