@@ -48,7 +48,7 @@ open import Relation.Binary.PropositionalEquality.Properties as ≡
4848open import Relation.Binary.PropositionalEquality as ≡
4949 using (≡-≟-identity; ≢-≟-identity)
5050open import Relation.Nullary.Decidable as Dec
51- using (Dec; _because_; yes; no; _×-dec_ ; _⊎-dec_ ; map′; decidable-stable)
51+ using (Dec; _because_; yes; no; _×?_ ; _⊎?_ ; map′; decidable-stable)
5252open import Relation.Nullary.Negation.Core
5353 using (¬_; contradiction; contradiction′)
5454open import Relation.Nullary.Reflects using (invert)
@@ -1025,11 +1025,11 @@ module _ {P : Pred (Fin (suc n)) p} where
10251025
10261026any? : ∀ {P : Pred (Fin n) p} → Decidable P → Dec (∃ P)
10271027any? {zero} P? = no λ { (() , _) }
1028- any? {suc _} P? = Dec.map ⊎⇔∃ (P? zero ⊎-dec any? (P? ∘ suc))
1028+ any? {suc _} P? = Dec.map ⊎⇔∃ (P? zero ⊎? any? (P? ∘ suc))
10291029
10301030all? : ∀ {P : Pred (Fin n) p} → Decidable P → Dec (∀ i → P i)
10311031all? {zero} P? = yes λ ()
1032- all? {suc _} P? = Dec.map ∀-cons-⇔ (P? zero ×-dec all? (P? ∘ suc))
1032+ all? {suc _} P? = Dec.map ∀-cons-⇔ (P? zero ×? all? (P? ∘ suc))
10331033
10341034private
10351035 -- A nice computational property of `all?`:
@@ -1104,7 +1104,7 @@ decFinSubset {suc _} {P = P} {Q = Q} Q? P? = dec[Q⊆P]
11041104 dec[Q⊆P] : Dec (Q ⊆ P)
11051105 dec[Q⊆P] with Q? zero
11061106 ... | no ¬q₀ = map′ (cons (contradiction′ ¬q₀)) Q⊆P⇒Q⊆ₛP ih
1107- ... | yes q₀ = map′ (uncurry (cons ∘ const)) < _$ q₀ , Q⊆P⇒Q⊆ₛP > (P? q₀ ×-dec ih)
1107+ ... | yes q₀ = map′ (uncurry (cons ∘ const)) < _$ q₀ , Q⊆P⇒Q⊆ₛP > (P? q₀ ×? ih)
11081108
11091109------------------------------------------------------------------------
11101110-- Properties of functions to and from Fin
@@ -1148,7 +1148,7 @@ cantor-schröder-bernstein f-inj g-inj = ℕ.≤-antisym
11481148injective⇒existsPivot : ∀ {f : Fin n → Fin m} → Injective _≡_ _≡_ f →
11491149 ∀ (i : Fin n) → ∃ λ j → j ≤ i × i ≤ f j
11501150injective⇒existsPivot {f = f} f-injective i
1151- with any? (λ j → j ≤? i ×-dec i ≤? f j)
1151+ with any? (λ j → j ≤? i ×? i ≤? f j)
11521152... | yes result = result
11531153... | no ¬result = contradiction′ notInjective-Fin[1+n]→Fin[n] f∘inject!-injective
11541154 where
0 commit comments