Built with doc-gen4, running Lean4. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓to navigate, Ctrl+🖱️to focus. On Mac, use Cmdinstead of Ctrl.
/-!
## Decision by enumeration

For a type `X` that is finite (or more generally, *compact*), it is possible to automatically decide
any statement of the form `∀ x : X, P x` by enumeration when `P` is a decidable predicate on `X` 
(i.e., a predicate for the individual propositions `P x` are decidable for any given `x : X`).

## Overview

The `EnumDecide.decideForall` typeclass defines the property of a type being exhaustively checkable.

Results in this file include 
- `EnumDecide.decideFin` - the type `Fin n` (the canonical finite set with `n` elements) is checkable for any `n : ℕ`.
- `EnumDecide.decideUnit` - the single-element type is exhaustively checkable.
- `EnumDecide.decideProd`, `EnumDecide.decideSum` - the product and direct sum of two exhaustively checkable. 
- `EnumDecide.funEnum` - the type of functions from an exhaustively checkable type to 
                          a type with decidable equality is exhaustively checkable.  
-/

namespace EnumDecide

/-- It is possible to check whether a given decidable predicate holds for all natural numbers below a given bound. -/
def 
decideBelow: (p : NatProp) → [inst : DecidablePred p] → (bound : Nat) → Decidable (∀ (n : Nat), n < boundp n)
decideBelow
(
p: NatProp
p
:
Nat: Type
Nat
Prop: Type
Prop
)[
DecidablePred: {α : Sort ?u.6} → (αProp) → Sort (max1?u.6)
DecidablePred
p: NatProp
p
](
bound: Nat
bound
:
Nat: Type
Nat
):
Decidable: PropType
Decidable
(∀
n: Nat
n
:
Nat: Type
Nat
,
n: Nat
n
<
bound: Nat
bound
p: NatProp
p
n: Nat
n
) := match
bound: Nat
bound
with |
0: Nat
0
=>
p: NatProp

inst✝: DecidablePred p

bound: Nat


Decidable (∀ (n : Nat), n < 0p n)
p: NatProp

inst✝: DecidablePred p

bound: Nat


h
∀ (n : Nat), n < 0p n
p: NatProp

inst✝: DecidablePred p

bound: Nat


Decidable (∀ (n : Nat), n < 0p n)
p: NatProp

inst✝: DecidablePred p

bound, n: Nat

bd: n < 0


h
p n
p: NatProp

inst✝: DecidablePred p

bound: Nat


Decidable (∀ (n : Nat), n < 0p n)

Goals accomplished! 🐙
|
k: Nat
k
+ 1 => let
prev: ?m.124
prev
:=
decideBelow: (p : NatProp) → [inst : DecidablePred p] → (bound : Nat) → Decidable (∀ (n : Nat), n < boundp n)
decideBelow
p: NatProp
p
k: Nat
k
match
prev: ?m.124
prev
with |
Decidable.isTrue: {p : Prop} → pDecidable p
Decidable.isTrue
hyp: ∀ (n : Nat), n < kp n
hyp
=> if
c: ?m.173
c
:
p: NatProp
p
k: Nat
k
then
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k


h
∀ (n : Nat), n < k + 1p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1


h
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

x✝: Nat.succ n = k + 1 Nat.succ n < k + 1


h
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

eql: Nat.succ n = k + 1


h.inl
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

eql: Nat.succ n = k + 1


h.inl
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

eql: Nat.succ n = k + 1


n = k

Goals accomplished! 🐙
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

eql: Nat.succ n = k + 1


h.inl
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

eql: Nat.succ n = k + 1

eql': n = k


h.inl
p k
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

eql: Nat.succ n = k + 1


h.inl
p n

Goals accomplished! 🐙
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

x✝: Nat.succ n = k + 1 Nat.succ n < k + 1


h
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

lt: Nat.succ n < k + 1


h.inr
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

lt: Nat.succ n < k + 1


h.inr
p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

lt: Nat.succ n < k + 1


n < k
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

lt: Nat.succ n < k + 1


a
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

lt: Nat.succ n < k + 1


n < k

Goals accomplished! 🐙
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: p k

n: Nat

bd: n < k + 1

lt: Nat.succ n < k + 1


h.inr
p n

Goals accomplished! 🐙
else
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k


h
¬∀ (n : Nat), n < k + 1p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k

contra: ∀ (n : Nat), n < k + 1p n


h
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k

contra: ∀ (n : Nat), n < k + 1p n


h
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k

contra: ∀ (n : Nat), n < k + 1p n


p k
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k

contra: ∀ (n : Nat), n < k + 1p n


k < k + 1
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k

contra: ∀ (n : Nat), n < k + 1p n


p k

Goals accomplished! 🐙
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ∀ (n : Nat), n < kp n

c: ¬p k


Decidable (∀ (n : Nat), n < k + 1p n)

Goals accomplished! 🐙
|
Decidable.isFalse: {p : Prop} → ¬pDecidable p
Decidable.isFalse
hyp: ¬∀ (n : Nat), n < kp n
hyp
=>
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n


h
¬∀ (n : Nat), n < k + 1p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n


h
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n


Decidable (∀ (n : Nat), n < k + 1p n)
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n


h
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n


∀ (n : Nat), n < kp n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n

n: Nat

bd: n < k


p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n


∀ (n : Nat), n < kp n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n

n: Nat

bd: n < k


p n
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n

n: Nat

bd: n < k


n < k + 1
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n

n: Nat

bd: n < k


h
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n

n: Nat

bd: n < k


n < k + 1

Goals accomplished! 🐙
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n

contra: ∀ (n : Nat), n < k + 1p n


∀ (n : Nat), n < kp n

Goals accomplished! 🐙
p: NatProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelow p k: Decidable (∀ (n : Nat), n < kp n)

hyp: ¬∀ (n : Nat), n < kp n


Decidable (∀ (n : Nat), n < k + 1p n)

Goals accomplished! 🐙
def
decideBelowFin: {m : Nat} → (p : Fin mProp) → [inst : DecidablePred p] → (bound : Nat) → Decidable (∀ (n : Fin m), n.val < boundp n)
decideBelowFin
{
m: Nat
m
:
Nat: Type
Nat
}(
p: Fin mProp
p
:
Fin: NatType
Fin
m: Nat
m
Prop: Type
Prop
)[
DecidablePred: {α : Sort ?u.1263} → (αProp) → Sort (max1?u.1263)
DecidablePred
p: Fin mProp
p
](
bound: Nat
bound
:
Nat: Type
Nat
):
Decidable: PropType
Decidable
(∀
n: Fin m
n
:
Fin: NatType
Fin
m: Nat
m
,
n: Fin m
n
<
bound: Nat
bound
p: Fin mProp
p
n: Fin m
n
) := match
bound: Nat
bound
with |
0: Nat
0
=>
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound: Nat


Decidable (∀ (n : Fin m), n.val < 0p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound: Nat


h
∀ (n : Fin m), n.val < 0p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound: Nat


Decidable (∀ (n : Fin m), n.val < 0p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound: Nat

n: Fin m

bd: n.val < 0


h
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound: Nat


Decidable (∀ (n : Fin m), n.val < 0p n)

Goals accomplished! 🐙
|
k: Nat
k
+ 1 => let
prev: ?m.1662
prev
:=
decideBelowFin: {m : Nat} → (p : Fin mProp) → [inst : DecidablePred p] → (bound : Nat) → Decidable (∀ (n : Fin m), n.val < boundp n)
decideBelowFin
p: Fin mProp
p
k: Nat
k
match
prev: ?m.1662
prev
with |
Decidable.isTrue: {p : Prop} → pDecidable p
Decidable.isTrue
hyp: ∀ (n : Fin m), n.val < kp n
hyp
=> if
ineq: ?m.1726
ineq
:
k: Nat
k
<
m: Nat
m
then if
c: ?m.1746
c
:
p: Fin mProp
p
k: Nat
k
,
ineq: ?m.1726
ineq
then
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }


h
∀ (n : Fin m), n.val < k + 1p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1


h
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

x✝: Nat.succ n.val = k + 1 Nat.succ n.val < k + 1


h
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


h.inl
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


h.inl
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


n = { val := k, isLt := ineq }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


a
n.val = { val := k, isLt := ineq }.val
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


n = { val := k, isLt := ineq }

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


h.inl
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1

eql': n = { val := k, isLt := ineq }


h.inl
p { val := k, isLt := ineq }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

eql: Nat.succ n.val = k + 1


h.inl
p n

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

x✝: Nat.succ n.val = k + 1 Nat.succ n.val < k + 1


h
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

lt: Nat.succ n.val < k + 1


h.inr
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

lt: Nat.succ n.val < k + 1


h.inr
p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

lt: Nat.succ n.val < k + 1


n.val < k
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

lt: Nat.succ n.val < k + 1


a
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

lt: Nat.succ n.val < k + 1


n.val < k

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: p { val := k, isLt := ineq }

n: Fin m

bd: n.val < k + 1

lt: Nat.succ n.val < k + 1


h.inr
p n

Goals accomplished! 🐙
else
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }


h
¬∀ (n : Fin m), n.val < k + 1p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }

contra: ∀ (n : Fin m), n.val < k + 1p n


h
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }

contra: ∀ (n : Fin m), n.val < k + 1p n


h
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }

contra: ∀ (n : Fin m), n.val < k + 1p n


p { val := k, isLt := ineq }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }

contra: ∀ (n : Fin m), n.val < k + 1p n


{ val := k, isLt := ineq }.val < k + 1
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }

contra: ∀ (n : Fin m), n.val < k + 1p n


p { val := k, isLt := ineq }

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: k < m

c: ¬p { val := k, isLt := ineq }


Decidable (∀ (n : Fin m), n.val < k + 1p n)

Goals accomplished! 🐙
else
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m


h
∀ (n : Fin m), n.val < k + 1p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m

n: Nat

nbd: n < m

a✝: { val := n, isLt := nbd }.val < k + 1


h
p { val := n, isLt := nbd }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m

n: Nat

nbd: n < m

a✝: { val := n, isLt := nbd }.val < k + 1


h
p { val := n, isLt := nbd }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m

n: Nat

nbd: n < m

a✝: { val := n, isLt := nbd }.val < k + 1


m k
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m

n: Nat

nbd: n < m

a✝: { val := n, isLt := nbd }.val < k + 1


a
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m

n: Nat

nbd: n < m

a✝: { val := n, isLt := nbd }.val < k + 1


m k

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m

n: Nat

nbd: n < m

a✝: { val := n, isLt := nbd }.val < k + 1

ineq': m k

ineq'': Nat.succ n k


h
p { val := n, isLt := nbd }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ∀ (n : Fin m), n.val < kp n

ineq: ¬k < m


Decidable (∀ (n : Fin m), n.val < k + 1p n)

Goals accomplished! 🐙
|
Decidable.isFalse: {p : Prop} → ¬pDecidable p
Decidable.isFalse
hyp: ¬∀ (n : Fin m), n.val < kp n
hyp
=>
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n


h
¬∀ (n : Fin m), n.val < k + 1p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n


h
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n


Decidable (∀ (n : Fin m), n.val < k + 1p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n


h
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n


∀ (n : Fin m), n.val < kp n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n

n: Fin m

bd: n.val < k


p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n


∀ (n : Fin m), n.val < kp n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n

n: Fin m

bd: n.val < k


p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n

n: Fin m

bd: n.val < k


n.val < k + 1
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n

n: Fin m

bd: n.val < k


h
Nat.succ n.val k
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n

n: Fin m

bd: n.val < k


n.val < k + 1

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n

contra: ∀ (n : Fin m), n.val < k + 1p n


∀ (n : Fin m), n.val < kp n

Goals accomplished! 🐙
m: Nat

p: Fin mProp

inst✝: DecidablePred p

bound, k: Nat

prev:= decideBelowFin p k: Decidable (∀ (n : Fin m), n.val < kp n)

hyp: ¬∀ (n : Fin m), n.val < kp n


Decidable (∀ (n : Fin m), n.val < k + 1p n)

Goals accomplished! 🐙
/-- It is possible to decide whether a predicate holds for all elements of `Fin n`. -/ def
decideFin: {m : Nat} → (p : Fin mProp) → [inst : DecidablePred p] → Decidable (∀ (n : Fin m), p n)
decideFin
{
m: Nat
m
:
Nat: Type
Nat
}(
p: Fin mProp
p
:
Fin: NatType
Fin
m: Nat
m
Prop: Type
Prop
)[
DecidablePred: {α : Sort ?u.4157} → (αProp) → Sort (max1?u.4157)
DecidablePred
p: Fin mProp
p
]:
Decidable: PropType
Decidable
(∀
n: Fin m
n
:
Fin: NatType
Fin
m: Nat
m
,
p: Fin mProp
p
n: Fin m
n
) := match
decideBelowFin: {m : Nat} → (p : Fin mProp) → [inst : DecidablePred p] → (bound : Nat) → Decidable (∀ (n : Fin m), n.val < boundp n)
decideBelowFin
p: Fin mProp
p
m: Nat
m
with |
Decidable.isTrue: {p : Prop} → pDecidable p
Decidable.isTrue
hyp: ∀ (n : Fin m), n.val < mp n
hyp
=>
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ∀ (n : Fin m), n.val < mp n


h
∀ (n : Fin m), p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ∀ (n : Fin m), n.val < mp n

n: Nat

ineq: n < m


h
p { val := n, isLt := ineq }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)

Goals accomplished! 🐙
|
Decidable.isFalse: {p : Prop} → ¬pDecidable p
Decidable.isFalse
hyp: ¬∀ (n : Fin m), n.val < mp n
hyp
=>
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n


h
¬∀ (n : Fin m), p n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n

contra: ∀ (n : Fin m), p n


h
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n

contra: ∀ (n : Fin m), p n


h
∀ (n : Fin m), n.val < mp n
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n

contra: ∀ (n : Fin m), p n

n: Nat

ineq: n < m

a✝: { val := n, isLt := ineq }.val < m


h
p { val := n, isLt := ineq }
m: Nat

p: Fin mProp

inst✝: DecidablePred p

hyp: ¬∀ (n : Fin m), n.val < mp n


Decidable (∀ (n : Fin m), p n)

Goals accomplished! 🐙
/-- A typeclass for "exhaustively verifiable types", i.e., types for which it is possible to decide whether a given (decidable) predicate holds for all its elements. -/ class
DecideForall: Type u_1 → Type u_1
DecideForall
(
α: Type ?u.4638
α
:
Type _: Type (?u.4638+1)
Type _
) where
decideForall: {α : Type u_1} → [self : DecideForall α] → (p : αProp) → [inst : DecidablePred p] → Decidable (∀ (x : α), p x)
decideForall
(
p: αProp
p
:
α: Type ?u.4638
α
Prop: Type
Prop
) [
DecidablePred: {α : Sort ?u.4647} → (αProp) → Sort (max1?u.4647)
DecidablePred
p: αProp
p
]:
Decidable: PropType
Decidable
(∀
x: α
x
:
α: Type ?u.4638
α
,
p: αProp
p
x: α
x
)
instance: {k : Nat} → DecideForall (Fin k)
instance
{
k: Nat
k
:
Nat: Type
Nat
} :
DecideForall: Type ?u.4669 → Type ?u.4669
DecideForall
(
Fin: NatType
Fin
k: Nat
k
) := ⟨
k: Nat


(p : Fin kProp) → [inst : DecidablePred p] → Decidable (∀ (x : Fin k), p x)

Goals accomplished! 🐙
instance: {α : Type u_1} → [dfa : DecideForall α] → {p : αProp} → [inst : DecidablePred p] → Decidable (∀ (x : α), p x)
instance
{
α: Type ?u.4745
α
:
Type _: Type (?u.4745+1)
Type _
}[
dfa: DecideForall α
dfa
:
DecideForall: Type ?u.4748 → Type ?u.4748
DecideForall
α: Type ?u.4745
α
]{
p: αProp
p
:
α: Type ?u.4745
α
Prop: Type
Prop
}[
DecidablePred: {α : Sort ?u.4755} → (αProp) → Sort (max1?u.4755)
DecidablePred
p: αProp
p
]:
Decidable: PropType
Decidable
(∀
x: α
x
:
α: Type ?u.4745
α
,
p: αProp
p
x: α
x
) :=
dfa: DecideForall α
dfa
.
decideForall: {α : Type ?u.4776} → [self : DecideForall α] → (p : αProp) → [inst : DecidablePred p] → Decidable (∀ (x : α), p x)
decideForall
p: αProp
p
section Examples
example: ∀ (x : Fin 3), x + 0 = x
example
: ∀
x: Fin 3
x
:
Fin: NatType
Fin
3: ?m.4860
3
,
x: Fin 3
x
+
0: ?m.4875
0
=
x: Fin 3
x
:=

∀ (x : Fin 3), x + 0 = x

Goals accomplished! 🐙
example: ∀ (x y : Fin 3), x + y = y + x
example
: ∀
x: Fin 3
x
y: Fin 3
y
:
Fin: NatType
Fin
3: ?m.5059
3
,
x: Fin 3
x
+
y: Fin 3
y
=
y: Fin 3
y
+
x: Fin 3
x
:=

∀ (x y : Fin 3), x + y = y + x

Goals accomplished! 🐙
theorem
Zmod3.assoc: ∀ (x y z : Fin 3), x + y + z = x + (y + z)
Zmod3.assoc
: ∀
x: Fin 3
x
y: Fin 3
y
z: Fin 3
z
:
Fin: NatType
Fin
3: ?m.5431
3
, (
x: Fin 3
x
+
y: Fin 3
y
) +
z: Fin 3
z
=
x: Fin 3
x
+ (
y: Fin 3
y
+
z: Fin 3
z
) :=

∀ (x y z : Fin 3), x + y + z = x + (y + z)

Goals accomplished! 🐙
end Examples section CompositeEnumeration @[instance] def
decideProd: {α : Type u_1} → {β : Type u_2} → [dfa : DecideForall α] → [dfb : DecideForall β] → (p : α × βProp) → [inst : DecidablePred p] → Decidable (∀ (xy : α × β), p xy)
decideProd
{
α: Type ?u.6329
α
β: Type ?u.6332
β
:
Type _: Type (?u.6332+1)
Type _
}[
dfa: DecideForall α
dfa
:
DecideForall: Type ?u.6335 → Type ?u.6335
DecideForall
α: Type ?u.6329
α
][
dfb: DecideForall β
dfb
:
DecideForall: Type ?u.6338 → Type ?u.6338
DecideForall
β: Type ?u.6332
β
] (
p: α × βProp
p
:
α: Type ?u.6329
α
×
β: Type ?u.6332
β
Prop: Type
Prop
)[
DecidablePred: {α : Sort ?u.6347} → (αProp) → Sort (max1?u.6347)
DecidablePred
p: α × βProp
p
] :
Decidable: PropType
Decidable
(∀
xy: α × β
xy
:
α: Type ?u.6329
α
×
β: Type ?u.6332
β
,
p: α × βProp
p
xy: α × β
xy
) := if
c: ?m.6487
c
: (∀
x: α
x
:
α: Type ?u.6329
α
, ∀
y: β
y
:
β: Type ?u.6332
β
,
p: α × βProp
p
(
x: α
x
,
y: β
y
)) then
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ∀ (x : α) (y : β), p (x, y)


h
∀ (xy : α × β), p xy
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ∀ (x : α) (y : β), p (x, y)

x: α

y: β


h
p (x, y)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)

Goals accomplished! 🐙
else
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)


h
¬∀ (xy : α × β), p xy
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)

contra: ∀ (xy : α × β), p xy


h
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)

contra: ∀ (xy : α × β), p xy


h
∀ (x : α) (y : β), p (x, y)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)

contra: ∀ (xy : α × β), p xy

x: α

y: β


h
p (x, y)
α: Type ?u.6329

β: Type ?u.6332

dfa: DecideForall α

dfb: DecideForall β

p: α × βProp

inst✝: DecidablePred p

c: ¬∀ (x : α) (y : β), p (x, y)


Decidable (∀ (xy : α × β), p xy)

Goals accomplished! 🐙
instance: {α : Type u_1} → {β : Type u_2} → [dfa : DecideForall α] → [dfb : DecideForall β] → DecideForall (α × β)
instance
{
α: Type ?u.6838
α
β: Type ?u.6841
β
:
Type _: Type (?u.6838+1)
Type _
}[
dfa: DecideForall α
dfa
:
DecideForall: Type ?u.6844 → Type ?u.6844
DecideForall
α: Type ?u.6838
α
][
dfb: DecideForall β
dfb
:
DecideForall: Type ?u.6847 → Type ?u.6847
DecideForall
β: Type ?u.6841
β
] :
DecideForall: Type ?u.6850 → Type ?u.6850
DecideForall
(
α: Type ?u.6838
α
×
β: Type ?u.6841
β
) := ⟨
α: Type ?u.6838

β: Type ?u.6841

dfa: DecideForall α

dfb: DecideForall β


(p : α × βProp) → [inst : DecidablePred p] → Decidable (∀ (x : α × β), p x)

Goals accomplished! 🐙
⟩ @[instance] def
decideUnit: (p : UnitProp) → [inst : DecidablePred p] → Decidable (∀ (x : Unit), p x)
decideUnit
(
p: UnitProp
p
:
Unit: Type
Unit
Prop: Type
Prop
)[
DecidablePred: {α : Sort ?u.6941} → (αProp) → Sort (max1?u.6941)
DecidablePred
p: UnitProp
p
] :
Decidable: PropType
Decidable
(∀
x: Unit
x
:
Unit: Type
Unit
,
p: UnitProp
p
x: Unit
x
) := if
c: ?m.6977
c
:
p: UnitProp
p
(
(): Unit
()
) then
p: UnitProp

inst✝: DecidablePred p

c: p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: p ()


h
∀ (x : Unit), p x
p: UnitProp

inst✝: DecidablePred p

c: p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: p ()

x: Unit


h
p x
p: UnitProp

inst✝: DecidablePred p

c: p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: p ()

x: Unit


h
p x
p: UnitProp

inst✝: DecidablePred p

c: p ()

x: Unit


x = ()

Goals accomplished! 🐙
p: UnitProp

inst✝: DecidablePred p

c: p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: p ()

x: Unit

l: x = ()


h
p x
p: UnitProp

inst✝: DecidablePred p

c: p ()

x: Unit

l: x = ()


h
p ()
p: UnitProp

inst✝: DecidablePred p

c: p ()

x: Unit

l: x = ()


h
p ()
p: UnitProp

inst✝: DecidablePred p

c: p ()


Decidable (∀ (x : Unit), p x)

Goals accomplished! 🐙
else
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()


h
¬∀ (x : Unit), p x
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()

contra: ∀ (x : Unit), p x


h
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()


Decidable (∀ (x : Unit), p x)
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()

contra: ∀ (x : Unit), p x


h
p ()
p: UnitProp

inst✝: DecidablePred p

c: ¬p ()


Decidable (∀ (x : Unit), p x)

Goals accomplished! 🐙
instance: DecideForall Unit
instance
:
DecideForall: Type ?u.7086 → Type ?u.7086
DecideForall
Unit: Type
Unit
:= ⟨

(p : UnitProp) → [inst : DecidablePred p] → Decidable (∀ (x : Unit), p x)

Goals accomplished! 🐙
⟩ @[instance] def
decideSum: {α : Type ?u.7121} → {β : Type ?u.7124} → [dfa : DecideForall α] → [dfb : DecideForall β] → (p : α βProp) → [inst : DecidablePred p] → Decidable (∀ (x : α β), p x)
decideSum
{
α: Type ?u.7121
α
β: Type ?u.7124
β
:
Type _: Type (?u.7124+1)
Type _
}[
dfa: DecideForall α
dfa
:
DecideForall: Type ?u.7127 → Type ?u.7127
DecideForall
α: Type ?u.7121
α
][
dfb: DecideForall β
dfb
:
DecideForall: Type ?u.7130 → Type ?u.7130
DecideForall
β: Type ?u.7124
β
](
p: α βProp
p
:
α: Type ?u.7121
α
β: Type ?u.7124
β
Prop: Type
Prop
)[
DecidablePred: {α : Sort ?u.7139} → (αProp) → Sort (max1?u.7139)
DecidablePred
p: α βProp
p
] :
Decidable: PropType
Decidable
(∀
x: α β
x
:
α: Type ?u.7121
α
β: Type ?u.7124
β
,
p: α βProp
p
x: α β
x
) := if
c: ?m.7299
c
: ∀
x: α
x
:
α: Type ?u.7121
α
,
p: α βProp
p
(
Sum.inl: {α : Type ?u.7170} → {β : Type ?u.7169} → αα β
Sum.inl
x: α
x
) then if
c': ?m.7279
c'
: ∀
y: β
y
:
β: Type ?u.7124
β
,
p: α βProp
p
(
Sum.inr: {α : Type ?u.7230} → {β : Type ?u.7229} → βα β
Sum.inr
y: β
y
) then
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)


h
∀ (x : α β), p x
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)

x: α β


h
p x
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)

x: α β


h
p x
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)

a: α


h.inl
p (Sum.inl a)

Goals accomplished! 🐙
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)

x: α β


h
p x
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ∀ (y : β), p (Sum.inr y)

a: β


h.inr
p (Sum.inr a)

Goals accomplished! 🐙
else
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)


h
¬∀ (x : α β), p x
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)

contra: ∀ (x : α β), p x


h
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)

contra: ∀ (x : α β), p x


h
∀ (y : β), p (Sum.inr y)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)

contra: ∀ (x : α β), p x

x: β


h
p (Sum.inr x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ∀ (x : α), p (Sum.inl x)

c': ¬∀ (y : β), p (Sum.inr y)


Decidable (∀ (x : α β), p x)

Goals accomplished! 🐙
else
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)


h
¬∀ (x : α β), p x
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)

contra: ∀ (x : α β), p x


h
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)

contra: ∀ (x : α β), p x


h
∀ (x : α), p (Sum.inl x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)


Decidable (∀ (x : α β), p x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)

contra: ∀ (x : α β), p x

x: α


h
p (Sum.inl x)
α: Type ?u.7121

β: Type ?u.7124

dfa: DecideForall α

dfb: DecideForall β

p: α βProp

inst✝: DecidablePred p

c: ¬∀ (x : α), p (Sum.inl x)


Decidable (∀ (x : α β), p x)

Goals accomplished! 🐙
instance: {α : Type u_1} → {β : Type u_2} → [dfa : DecideForall α] → [dfb : DecideForall β] → DecideForall (α β)
instance
{
α: Type ?u.7606
α
β: Type ?u.7609
β
:
Type _: Type (?u.7606+1)
Type _
}[
dfa: DecideForall α
dfa
:
DecideForall: Type ?u.7612 → Type ?u.7612
DecideForall
α: Type ?u.7606
α
][
dfb: DecideForall β
dfb
:
DecideForall: Type ?u.7615 → Type ?u.7615
DecideForall
β: Type ?u.7609
β
] :
DecideForall: Type ?u.7618 → Type ?u.7618
DecideForall
(
α: Type ?u.7606
α
β: Type ?u.7609
β
) := ⟨
α: Type ?u.7606

β: Type ?u.7609

dfa: DecideForall α

dfb: DecideForall β


(p : α βProp) → [inst : DecidablePred p] → Decidable (∀ (x : α β), p x)

Goals accomplished! 🐙
instance
funEnum: {α : Type u_1} → {β : Type u_2} → [dfa : DecideForall α] → [dfb : DecidableEq β] → DecidableEq (αβ)
funEnum
{
α: Type ?u.7705
α
β: Type ?u.7708
β
:
Type _: Type (?u.7705+1)
Type _
}[
dfa: DecideForall α
dfa
:
DecideForall: Type ?u.7711 → Type ?u.7711
DecideForall
α: Type ?u.7705
α
][
dfb: DecidableEq β
dfb
:
DecidableEq: Sort ?u.7714 → Sort (max1?u.7714)
DecidableEq
β: Type ?u.7708
β
] :
DecidableEq: Sort ?u.7723 → Sort (max1?u.7723)
DecidableEq
(
α: Type ?u.7705
α
β: Type ?u.7708
β
) := fun
f: ?m.7744
f
g: ?m.7748
g
=> if
c: ?m.7820
c
:∀
x: α
x
:
α: Type ?u.7705
α
,
f: ?m.7744
f
x: α
x
=
g: ?m.7748
g
x: α
x
then
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x


h
f = g
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x


h.h
∀ (x : α), f x = g x
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x

x: α


h.h
f x = g x
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ∀ (x : α), f x = g x


Decidable (f = g)

Goals accomplished! 🐙
else
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x


h
¬f = g
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x

contra: f = g


h
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x

contra: f = g


h
∀ (x : α), f x = g x
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x


Decidable (f = g)
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x

contra: f = g

x: α


h
f x = g x
α: Type ?u.7705

β: Type ?u.7708

dfa: DecideForall α

dfb: DecidableEq β

f, g: αβ

c: ¬∀ (x : α), f x = g x


Decidable (f = g)

Goals accomplished! 🐙
example: ∀ (xy : Fin 3 × Fin 2), xy.fst.val + xy.snd.val = xy.snd.val + xy.fst.val
example
: ∀
xy: Fin 3 × Fin 2
xy
: (
Fin: NatType
Fin
3: ?m.8059
3
) × (
Fin: NatType
Fin
2: ?m.8068
2
),
xy: Fin 3 × Fin 2
xy
.
1: {α : Type ?u.8079} → {β : Type ?u.8078} → α × βα
1
.
val: {n : Nat} → Fin nNat
val
+
xy: Fin 3 × Fin 2
xy
.
2: {α : Type ?u.8087} → {β : Type ?u.8086} → α × ββ
2
.
val: {n : Nat} → Fin nNat
val
=
xy: Fin 3 × Fin 2
xy
.
2: {α : Type ?u.8095} → {β : Type ?u.8094} → α × ββ
2
.
val: {n : Nat} → Fin nNat
val
+
xy: Fin 3 × Fin 2
xy
.
1: {α : Type ?u.8100} → {β : Type ?u.8099} → α × βα
1
.
val: {n : Nat} → Fin nNat
val
:=

∀ (xy : Fin 3 × Fin 2), xy.fst.val + xy.snd.val = xy.snd.val + xy.fst.val

Goals accomplished! 🐙
end CompositeEnumeration