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
|
||||
open nat quot list subtype binary function eq.ops
|
||||
open [declarations] perm
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
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
|
||||
open nat nat.finset eq.ops
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace finset
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Author: Leonardo de Moura
|
|||
-/
|
||||
import data.finset.card
|
||||
open nat nat.finset decidable
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace finset
|
||||
variable {A : Type}
|
||||
|
|
|
@ -7,7 +7,7 @@ Author : Haitao Zhang
|
|||
import data
|
||||
|
||||
open nat function eq.ops
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace list
|
||||
-- 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.
|
||||
-/
|
||||
import data.nat data.finset.equiv data.list
|
||||
open nat binary
|
||||
open nat binary algebra
|
||||
open - [notations] finset
|
||||
open - [notations] algebra
|
||||
|
||||
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
|
||||
open [coercions] [reduce_hints] nat
|
||||
open [declarations] [classes] nat (succ)
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
open eq.ops
|
||||
|
||||
namespace int
|
||||
|
|
|
@ -8,7 +8,7 @@ and transfer the results.
|
|||
-/
|
||||
import .basic algebra.ordered_ring
|
||||
open nat
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
open decidable
|
||||
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
|
||||
|
||||
namespace int
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
definition int_has_pow_nat [reducible] [instance] [priority int.prio] : has_pow_nat int :=
|
||||
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
|
||||
open eq.ops helper_tactics nat prod function option
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
inductive list (T : Type) : Type :=
|
||||
| nil {} : list T
|
||||
|
|
|
@ -289,7 +289,7 @@ nat.cases_on n
|
|||
... = succ (succ n' * m' + n') : add_succ)⁻¹
|
||||
!succ_ne_zero))
|
||||
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
protected definition comm_semiring [reducible] [trans_instance] : algebra.comm_semiring nat :=
|
||||
⦃algebra.comm_semiring,
|
||||
add := nat.add,
|
||||
|
|
|
@ -7,7 +7,7 @@ Definitions and properties of div and mod. Much of the development follows Isabe
|
|||
-/
|
||||
import data.nat.sub
|
||||
open eq.ops well_founded decidable prod
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace nat
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Authors: Leonardo de Moura
|
|||
Factorial
|
||||
-/
|
||||
import data.nat.div
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace nat
|
||||
definition fact : nat → nat
|
||||
|
|
|
@ -7,7 +7,7 @@ Definitions and properties of gcd, lcm, and coprime.
|
|||
-/
|
||||
import .div
|
||||
open eq.ops well_founded decidable prod
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
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 -/
|
||||
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
protected definition decidable_linear_ordered_semiring [reducible] [trans_instance] :
|
||||
algebra.decidable_linear_ordered_semiring nat :=
|
||||
|
|
|
@ -7,7 +7,7 @@ Elegant pairing function.
|
|||
-/
|
||||
import data.nat.sqrt data.nat.div
|
||||
open prod decidable
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace nat
|
||||
definition mkpair (a b : nat) : nat :=
|
||||
|
|
|
@ -6,7 +6,7 @@ Authors: Leonardo de Moura, Jeremy Avigad
|
|||
The power function on the natural numbers.
|
||||
-/
|
||||
import data.nat.basic data.nat.order data.nat.div data.nat.gcd algebra.ring_power
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace nat
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import data.nat.order data.nat.sub
|
|||
|
||||
namespace nat
|
||||
open decidable
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
-- This is the simplest possible function that just performs a linear search
|
||||
definition sqrt_aux : nat → nat → nat
|
||||
|
|
|
@ -289,7 +289,7 @@ sub.cases
|
|||
... = k - n + n : sub_add_cancel H3,
|
||||
le.intro (add.cancel_right H4))
|
||||
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
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))⁻¹,
|
||||
|
|
|
@ -10,7 +10,7 @@ are those needed for that construction.
|
|||
-/
|
||||
import data.rat.order data.nat
|
||||
open nat rat subtype eq.ops
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
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
|
||||
open int quot eq.ops
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
record prerat : Type :=
|
||||
(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
|
||||
open quot eq.ops
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
/- 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
|
||||
open nat eq pnat
|
||||
open algebra
|
||||
open - [coercions] rat
|
||||
open - [notations] algebra
|
||||
|
||||
local postfix `⁻¹` := pnat.inv
|
||||
local notation 0 := rat.of_num 0
|
||||
|
|
|
@ -13,7 +13,7 @@ section Bezout
|
|||
|
||||
open nat int
|
||||
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.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
|
||||
open int
|
||||
open - [notations] algebra
|
||||
open int algebra
|
||||
|
||||
example {p x y : ℕ} (pp : prime p) (H : p ∣ x * y) : p ∣ x ∨ p ∣ y :=
|
||||
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
|
||||
open eq.ops
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
/- 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
|
||||
open eq.ops finset well_founded decidable nat.finset
|
||||
open - [notations] algebra
|
||||
open algebra
|
||||
|
||||
namespace nat
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ Authors: Leonardo de Moura, Jeremy Avigad
|
|||
Prime numbers.
|
||||
-/
|
||||
import data.nat logic.identities
|
||||
open bool
|
||||
open - [notations] algebra
|
||||
open bool algebra
|
||||
|
||||
namespace nat
|
||||
open decidable
|
||||
|
|
Loading…
Reference in a new issue