Metamath problem 17

We import some interfaces and define some variables:  import (PROPOSITIONAL Interface:Classical_propositional_calculus ) import (AXIOMS Interface:Axioms_of_first-order_logic_as_set_forth_in_metamath_problem_17 (PROPOSITIONAL) )

var (formula φ ψ χ θ φx φy φs ψy antecedent) var (object s t u s0 s1 t0 t1) var (variable x y z x0 x1 y0 y1) 

The purpose of this page is to figure out whether the axioms at Interface:Axioms of first-order logic as set forth in metamath problem 17 are a sufficient set of axioms for first-order logic, as set forth in Interface:Axioms of first-order logic. We try to mostly follow a similar course of action as in First-order logic in terms of substitution built on equality.

A few rules based on axioms
Here is a rule form of.  thm (specializeToVariable ((H (∀ x φ))) (subst (value y) x φ) ( H       x φ y stdpc4 applyModusPonens )) 

Distributing for-all across an implication
At least for now, we adopted  as an axiom. Here are some consequences of that.  thm (addForAll ((H (φ → ψ))) ((∀ x φ) → (∀ x ψ)) ( H       x ax-gen

x φ ψ ForAllImplication

applyModusPonens ))

thm (buildForAll ((H (φ ↔ ψ))) ((∀ x φ) ↔ (∀ x ψ)) ( H eliminateBiconditionalReverse x addForAll H eliminateBiconditionalForward x addForAll introduceBiconditionalFromImplications )) 

Existential quantification
In Interface:Axioms of first-order logic as set forth in metamath problem 17 we defined  as. Here are a few easy consequences.  thm (NotThereExists  ((¬ (∃ x φ)) ↔ (∀ x (¬ φ))) ( x φ df-ex addNegation

(∀ x (¬ φ)) DoubleNegation swapBiconditional applyBiconditionalTransitivity ))

thm (NotForAll  ((¬ (∀ x φ)) ↔ (∃ x (¬ φ))) ( φ DoubleNegation x buildForAll addNegation

x (¬ φ) df-ex swapBiconditional applyBiconditionalTransitivity )) 

Adding there exists to both sides of an implication
Here we prove.  thm (ForAllImplicationThereExists  ((∀ x (φ → ψ)) → ((∃ x φ) → (∃ x ψ))) (  We start by changing  to   φ ψ Transposition eliminateBiconditionalReverse x addForAll  Then we distribute the quantifier across  and transpose to get.  x (¬ ψ) (¬ φ) ForAllImplication applySyllogism

introduceTranspositionInConsequent  Now we just need to apply the definition of.  x φ df-ex x ψ df-ex buildImplication

eliminateBiconditionalForward applySyllogism )) 

A consequence are builders for :  thm (addThereExists ((H (φ → ψ))) ((∃ x φ) → (∃ x ψ)) ( H       x ax-gen

x φ ψ ForAllImplicationThereExists

applyModusPonens ))

thm (buildThereExists ((H (φ ↔ ψ))) ((∃ x φ) ↔ (∃ x ψ)) ( H eliminateBiconditionalReverse x addThereExists H eliminateBiconditionalForward x addThereExists introduceBiconditionalFromImplications )) </jh>

What next?
TRY#2
 * variable is effectively not free in a theorem
 * specialize a theorem (HOW?)
 * x = x as theorem
 * stdpc7

TRY#3 φ ⊢ ∀ x ¬ ¬ φ φ ⊢ φ → ∀ x ¬ ¬ φ φ ⊢ ¬ ∀ x ¬ ¬ φ → ¬ φ
 * turn dfsb7 into some version of SubstItself

TRY#3a
 * Start out with some ∃ theorems? Look at First-order logic for ideas.

doubling? stmt (stdpc5 ((φ → (∀ x φ))) ((∀ x (φ → ψ)) → (φ → (∀ x ψ)))) φ → (∀ x φ) ⊢ ∀ x (φ → ∀ x φ) → (φ → ∀ x ∀ x φ) ∀ x φ → ∀ x ∀ x φ ⊢ ∀ x (∀ x φ → ψ) → (∀ x φ → ∀ x ψ)

ThereExistsIntroductionFromVariable? depends on SubstNegation

SubstNegation? [ y / x ] ¬ φ ↔ ∃ z (z = y ∧ ∃ x (x = z ∧ ¬ φ)) ¬ [ y / x ] φ ↔ ¬ ∃ z (z = y ∧ ∃ x (x = z ∧ φ)) ↔ ∀ z ¬ (z = y ∧ ∃ x (x = z ∧ φ)) ↔ ∀ z (z ≠ y ∨ ¬ ∃ x (x = z ∧ φ)) ↔ ∀ z (z ≠ y ∨ ∀ x ¬ (x = z ∧ φ)) ↔ ∀ z (z ≠ y ∨ ∀ x (x ≠ z ∨ ¬ φ)) ↔ ∀ z (z = y → ∀ x (x = z → ¬ φ)) stmt (dfsb7  ((subst (value y) x φ) ↔ (∃ z (((value z) = (value y)) ∧ (∃ x (((value x) = (value z)) ∧ φ))))))

Substitution of a variable for itself
We start with being able to substitute a variable for itself. The ability to remove such a substitution follows directly from our axioms (? - seems to need ∀ x x = x → x = x which we don't have yet).  </jh>
 * 1) thm (SubstItselfRemove  ((subst (value x) x φ) → φ) (
 * 2)        x stdpc6

Metamath axiomization of first-order logic
Once we are done, here we would export the metamath axioms, or rather the versions stated at Interface:Axioms of first-order logic.

 </jh>
 * 1) export (METAMATH Interface:Axioms_of_first-order_logic (PROPOSITIONAL) )