You are on page 1of 3

Proving the Symmetry Condition on Type Systems

Robert Harper

February 27, 2019

The candidate type system µ is constructed using Tarski’s Theorem as the least pre-fixed point
of an operator Types(−) on candidate type systems. The c.t.s. operator Types is defined by
several clauses, one of which is given by the c.t.s. operator Funs:

Types(τ ) , · · · ∪ Funs(τ ) ∪ . . . ,

where

Funs(τ )(a:A1 → A2 , a:A01 → A02 , φ) (1)


iff (2)
φ , a:φ1 → φ2 and (3)
A1 ∼ A01 ↓ φ1 ∈ τ and (4)
0 0
∀M, M if φ1 (M, M ) then A2 [M/a] ∼ A02 [M 0 /a] 0
↓ φ2 [M, M ] ∈ τ (5)

and

(a:φ1 → φ2 )(λa.N, λa.N 0 ) (6)


iff (7)
0 0 0 0
∀M, M if φ1 (M, M ) then φ2 [M, M ](N [M/a], N [M /a]). (8)

A candidate type system τ is a type system iff it satisfies the following conditions:

1. Unicity: if τ (A0 , A00 , φ) and τ (A0 , A00 , φ0 ), then φ0 = φ.

2. Symmetry: if τ (A0 , A00 , φ), then τ (A00 , A0 , φ);

3. Transitivity: if τ (A0 , A00 , φ) and τ (A00 , A000 , φ), then τ (A0 , A000 , φ).

4. PER Valuation: if τ (A0 , A00 , φ), then φ is symmetric and transitive.

The goal is to prove that µ is a type system. The unicity condition may be proved outright by
proving that Types(Φ) ⊆ Φ, where Φ(A0 , A00 , φ) iff µ(A0 , A00 , φ) and if µ(A0 , A00 , φ0 ), then φ0 = φ.
For then µ ⊆ Φ, which means that µ enjoys unicity. The proof was sketched in class, and presents
no further difficulties.
It is necessary to prove symmetry, transitivity, and PER valuation of µ simultaneously. To do
so, define Φ(A0 , A00 , φ) iff

1
1. µ(A0 , A00 , φ);
2. µ(A00 , A0 , φ).
3. if µ(B0 , A0 , φ0 ), then µ(B0 , A00 , φ0 ) and φ0 = φ.
4. if µ(A00 , B00 , φ0 ), then µ(A0 , B00 , φ0 ) and φ0 = φ.
5. φ is symmetric and transitive.
If Types(Φ) ⊆ Φ, then µ ⊆ Φ, and so µ is a type system. Note that by definition Φ ⊆ µ.

The proof breaks into cases, one for each operator defining Types. In particular it is necessary
to show that Funs(Φ) ⊆ Φ. Suppose that Funs(Φ)(A0 , A00 , φ), Then by definition A0 = a:A1 → A2 ,
A00 = a:A01 → A02 , and φ = a:φ1 → φ2 [a], where
1. A1 ∼ A01 ↓ φ1 ∈ Φ;
2. if M1 ∼ M10 ∈ φ1 , then A2 [M1 /a] ∼ A02 [M10 /a] ↓ φ2 [M1 , M10 ] ∈ Φ.
These conditions imply that φ1 is a PER, and that A02 [M10 /a] ∼ A2 [M1 /a] ↓ φ2 [M1 , M10 ] ∈ µ, with
φ2 [M1 , M10 ] being a PER, whenever M1 ∼ M10 ∈ φ1 .
The overall obligation is to show that Φ(A0 , A00 , φ), which includes the particular requirement
that µ(A00 , A0 , φ). Because Funs(µ) ⊆ µ, it suffices for this case to show these two conditions:
1. A01 ∼ A1 ↓ φ1 ∈ µ, and
2. if M1 ∼ M10 ∈ φ1 , then A02 [M1 /a] ∼ A2 [M10 /a] ↓ φ2 [M1 , M10 ] ∈ µ.
The first of these follows directly from the assumption A1 ∼ A01 ↓ φ1 ∈ Φ. For the second, suppose
that M1 ∼ M10 ∈ φ1 , with the intent to show that
A02 [M1 /a] ∼ A2 [M10 /a] ↓ φ2 [M1 , M10 ] ∈ µ.
Because φ1 is symmetric, M10 ∼ M1 ∈ φ1 , and so by the second assumption
A2 [M10 /a] ∼ A02 [M1 /a] ↓ φ2 [M10 , M1 ] ∈ Φ
. Therefore φ2 [M10 , M1 ] is a PER, and
A02 [M1 /a] ∼ A2 [M10 /a] ↓ φ2 [M10 , M1 ] ∈ µ
. To complete the proof it is enough to show that φ2 [M10 , M1 ] = φ2 [M1 , M10 ].
This equation is proved in two steps by showing that each side is equal to φ2 [M10 , M10 ].
1. By transitivity and symmetry of φ1 , it follows that M10 ∼ M10 ∈ φ1 , and hence by the second
assumption
A2 [M10 /a] ∼ A02 [M10 /a] ↓ φ2 (M10 , M10 ) ∈ Φ,
and so
A02 [M10 /a] ∼ A2 [M10 /a] ↓ φ2 (M10 , M10 ) ∈ µ.
Moreover, by the second assumption,
A2 [M10 /a] ∼ A02 [M1 /a] ↓ φ2 [M10 , M1 ] ∈ Φ ⊆ µ.
Therefore by right transitivity
A02 [M10 /a] ∼ A02 [M1 /a] ↓ φ2 [M10 , M10 ] and φ2 (M10 , M10 ) = φ2 (M10 , M1 ).

2
2. As in the previous case

A02 [M10 /a] ∼ A2 [M10 /a] ↓ φ2 [M10 , M10 ] ∈ µ,

and
A2 [M1 /a] ∼ A2 [M10 /a] ↓ φ2 [M1 , M10 ] ∈ Φ ⊆ µ.
By left transitivity

A2 [M1 /a] ∼ A2 [M10 /a] ↓ φ2 [M10 , M10 ] ∈ µ and φ2 [M10 , M1 ] = φ2 [M10 , M10 ].

Thus φ2 [M1 , M10 ] = φ2 [M1 , M10 ], as desired.

There is of course much more to the proof: the remaining conditions in Φ have to be verified for
the Funs case, and all of the other cases defining Types must be considered as well. However, the
same devices used here apply in all of these cases as well to complete the proof that µ is, in fact, a
type system.

Acknowledgement The foregoing development is based on Angiuli (2019).

References
Carlo Angiuli. Computational Semantics of Cartesian Cubical Type Theory. PhD thesis, Carnegie
Mellon University, Pittsburgh, PA 15217, May 2019. (Expected.).

You might also like