Types

We consider three kinds of types.

Propositions

Tableau Refutations

A branch is a finite set of propositions. We say a proposition is on the branch if it is in the set.
A branch is closed if one of the following holds:
  • False is on the branch.
  • ¬ True is on the branch.
  • ¬ (s = s) is on the branch.
  • Both P and ¬ P are on the branch.
  • Various rules corresponding to logical operators allow one to refute a branch by refuting extended branches. Closed branches are considered refuted. Theorems are proven by adding the negation to a branch and then refuting the branch.
    We give rules as they are needed for examples.
    Rule (Negated Implication) If ¬ (P → Q) is on the branch, then we can extend the branch with P and ¬ Q.
    Example: Prove ¬ ¬ P → P by refuting the branch with the negation of the formula.
    Rule (Implication) If P → Q is on the branch, then we can split into two subgoals to refute given by two extended branches: one extended by Q and the other extended by ¬ P
    Example: Prove ((P → Q) → P) → P by refuting the branch with the negation of the formula.
    Rule (And) If P ∧ Q is on the branch, then the branch can be extended with P and Q.
    Rule (NegAnd) If ¬ (P ∧ Q) is on the branch, then we can split into two subgoals to refute given by two extended branches: one extended by ¬ P and the other extended by ¬ Q.
    Rule (Remove Double Negation) If ¬ ¬ P is on the branch, then we can extend the branch with P.
    Example: Prove ¬ ¬ P ∧ ¬ ¬ Q → Q ∧ P by refuting the branch with the negation of the formula.
    Rule (Or) If P ∨ Q is on the branch, then we can split into two subgoals to refute given by two extended branches: one extended by P and the other extended by Q.
    Rule (NegOr) If ¬ (P ∨ Q) is on the branch, then the branch can be extended with ¬ P and ¬ Q.
    Example: Prove P ∨ Q → Q ∨ P by refuting the branch with the negation of the formula.
    The examples above are intended to be very easy. A short video showing all four being done is here in mp4 and webm formats.

    Terms of Function Type

    s [x := t] is the term resulting from substituting t for x (avoiding capture of bound variables when by changing the names of bound variables when necessary).
    When a lambda abstraction is applied to a term, we can β-reduce it by substituting the argument for the λ-bound variable.
    That is, (λ x.s) t β-reduces to s [x := t].
    We often write (λ x ... y.s) for several λ-abstractions in a row: (λ x ... λ y.s).

    Sets

    Object. The name In is a term of type setsetprop. If s and t have type set, then In s t has type prop. We usually write s ∈ t for In s t. That is, we use ∈ as an infix operator corresponding to applying In. Furthermore, we may write xA. P to mean x : set. xAP and write xA. P to mean x : set. xAP
    Definition. We define Subq to be λA B ⇒ ∀x ∈ A, xB of type setsetprop.
    Notation. We use as an infix operator corresponding to applying term Subq. Furthermore, we may write xA, B to mean x : set, xAB.
    Definition. We define nIn to be λx X ⇒ ¬ In x X of type setsetprop.
    Notation. We use as an infix operator corresponding to applying term nIn.

    Theorem: setminus is antimonotone.

    Object. The name setminus is a term of type setsetset.
    Notation. We use as an infix operator corresponding to applying term setminus.
    Known. (setminusI)
    ∀X Y z, (zX)(zY)zXY
    Known. (setminusE)
    ∀X Y z, (zXY)zXzY
    Theorem. (setminus_antimonotone) The following is provable:
    ∀A U V, UVAVAU
    A short video showing this theorem being proven is available in mp4 and webm formats.

    Theorem: Image is monotone.

    Object. The name Repl is a term of type set(setset)set.
    Notation. {B| xA} is notation for Repl Ax . B).
    Known. (ReplI)
    ∀A : set, ∀F : setset, ∀x : set, xAF x{F x|x ∈ A}
    Note that {F x|x ∈ A} is notation for Repl A (λ x.F x) which η-reduces to Repl A F.
    Known. (ReplE)
    ∀A : set, ∀F : setset, ∀y : set, y{F x|x ∈ A}∃x ∈ A, y = F x
    Theorem. (image_monotone) The following is provable:
    ∀f : setset, ∀U V, UV{f x|x ∈ U}{f x|x ∈ V}
    A short video showing this theorem being proven is available in mp4 and webm formats.

    Theorem: Image is in power set.

    Object. The name 𝒫 is a term of type setset.
    Known. (PowerI)
    ∀X Y : set, YXY𝒫 X
    Known. (PowerE)
    ∀X Y : set, Y𝒫 XYX
    Theorem. (image_In_Power) The following is provable:
    ∀A B, ∀f : setset, (∀x ∈ A, f xB)∀U ∈ 𝒫 A, {f x|x ∈ U}𝒫 B

    Theorem: Knaster Tarski Fixed Point

    We start by introducing a new known proposition: set extensionality. Two sets are equal if they are included in each other.
    Known. (set_ext)
    ∀X Y : set, XYYXX = Y
    We next consider an operation which separates out the elements of a set satisfying a property.
    Object. The name Sep is a term of type set(setprop)set.
    Notation. {xA | B} is notation for Sep Ax . B).
    Known. (SepI)
    ∀X : set, ∀P : (setprop), ∀x : set, xXP xx{x ∈ X|P x}
    Known. (SepE1)
    ∀X : set, ∀P : (setprop), ∀x : set, x{x ∈ X|P x}xX
    Known. (SepE2)
    ∀X : set, ∀P : (setprop), ∀x : set, x{x ∈ X|P x}P x
    Known. (Sep_In_Power)
    ∀X : set, ∀P : setprop, {x ∈ X|P x}𝒫 X
    Known. (setminus_In_Power)
    ∀A U, AU𝒫 A
    Theorem. (KnasterTarski_set) The following is provable:
    ∀A, ∀Φ : setset, (∀U ∈ 𝒫 A, Φ U𝒫 A)(∀U V ∈ 𝒫 A, UVΦ UΦ V)∃Y ∈ 𝒫 A, Φ Y = Y
    Proof:
    Let A and Φ be given.
    Assume Φ is a monotone function from the power set of A to the power set of A.
    We say X is a pre-fixed point if Φ X ⊆ X. We define Y to be the intersection of all pre-fixed points, giving the least pre-fixed point.
    Let Y be {u ∈ A|∀ X ∈ 𝒫 A . Φ X ⊆ X → u ∈ X}.
    • It is easy to prove Φ Y ⊆ Y. (Let u in Φ Y be given. To prove u ∈ Y, we must prove u ∈ X whenever X is a pre-fixed point. Let X be a pre-fixed point. Since Y ⊆ X and X is a pre-fixed point, Φ Y ⊆ Φ X ⊆ X and so u is in X.)
    • Using this, it is easy to prove Y ⊆ Φ Y. (By monotonicity and Φ Y ⊆ Y we have Φ (Φ Y) ⊆ Φ Y. That is, Φ Y is a pre-fixed point. Since Y is the least pre-fixed point, we have Y ⊆ Φ Y.)
    • By set extensionality Φ Y = Y as desired.
    Three short videos show these subgoals and the main goal being proven are available:
    • Subgoal 1 in mp4 and webm formats.
    • Subgoal 2 in mp4 and webm formats.
    • Main Goal in mp4 and webm formats.

    Theorem: Schroeder Bernstein

    Definition. We define inj to be λX Y f ⇒ (∀u ∈ X, f uY)(∀u v ∈ X, f u = f vu = v) of type setset(setset)prop.
    Definition. We define bij to be λX Y f ⇒ (∀u ∈ X, f uY)(∀u v ∈ X, f u = f vu = v)(∀w ∈ Y, ∃u ∈ X, f u = w) of type setset(setset)prop.
    Definition. We define equip to be λX Y : set∃f : setset, bij X Y f of type setsetprop.
    Object. The name If_i is a term of type propsetsetset.
    Notation. if cond then T else E is notation corresponding to If_i cond T E.
    Known. (If_i_1)
    ∀p : prop, ∀x y : set, p(if p then x else y) = x
    Known. (If_i_0)
    ∀p : prop, ∀x y : set, ¬ p(if p then x else y) = y
    Object. The name inv is a term of type set(setset)setset.
    Known. (inj_linv)
    ∀X, ∀f : setset, (∀u v ∈ X, f u = f vu = v)∀x ∈ X, inv X f (f x) = x
    Theorem. (SchroederBernstein) The following is provable:
    ∀A B, ∀f g : setset, inj A B finj B A gequip A B
    Proof:
    Let A, B, f and g such that inj A B f and inj B A g be given.
    Let Φ be λX ⇒ {g y|y ∈ B{f x|x ∈ AX}} of type setset.
    We can prove the following two claims:
    • ∀U ∈ 𝒫 A, Φ U𝒫 A.
    • ∀U V ∈ 𝒫 A, UVΦ UΦ V.
    Hence Knaster Tarski applies and there is a fixed point Y of Φ.
    Let h be λx ⇒ if xY then inv B g x else f x of type setset.
    This h will be the desired bijection from A to B. Before proving this, it is helpful to prove the following properties of h:
    • If z is in Y, then there is a y in B ∖ {f x|x ∈ AX} such that g y = z and h z = y.
    • If z is not in Y, then h z = f z.
    • For every z in A, either there is a y in B ∖ {f x|x ∈ AX} such that g y = z and h z = y or z is not in Y and h z = f z.
    The third property follows easily from the first two. Proving this with a tableau refutation might be easier with the following rule:
    Rule (Cut) If P has type prop, then a branch is refutable if it is refutable extended with P and it is refutable extended with ¬ P.
    Using the third property above makes it easy to prove the first two properties for h to be a bijection.
    • ∀u ∈ A, h uB
    • ∀u v ∈ A, h u = h vu = v
    The third property can also be proven: ∀w ∈ B, ∃u ∈ A, h u = w.
    Combining these we have bij A B h as desired.