Fibrational Units of Measure Timothy Revell and N. Ghani, R. - - PowerPoint PPT Presentation

fibrational units of measure
SMART_READER_LITE
LIVE PREVIEW

Fibrational Units of Measure Timothy Revell and N. Ghani, R. - - PowerPoint PPT Presentation

Fibrational Units of Measure Timothy Revell and N. Ghani, R. Atkey, S. Staton University of Strathclyde 1 Motivation 2 Motivation Units of Measure m , s , kg ... etc 2 Motivation Units of Measure m , s , kg ... etc Used for


slide-1
SLIDE 1

Fibrational Units of Measure

Timothy Revell

and N. Ghani, R. Atkey, S. Staton

University of Strathclyde

1

slide-2
SLIDE 2

Motivation

2

slide-3
SLIDE 3

Motivation

  • Units of Measure m, s, kg...etc

2

slide-4
SLIDE 4

Motivation

  • Units of Measure m, s, kg...etc
  • Used for measurement, e.g., X is twice as much as a metre

2

slide-5
SLIDE 5

Motivation

  • Units of Measure m, s, kg...etc
  • Used for measurement, e.g., X is twice as much as a metre
  • Single quantity can have many different units, e.g., metres,

inches, nautical mile, ...etc.

2

slide-6
SLIDE 6

Motivation

  • Units of Measure m, s, kg...etc
  • Used for measurement, e.g., X is twice as much as a metre
  • Single quantity can have many different units, e.g., metres,

inches, nautical mile, ...etc.

  • Class of representations is a dimension, e.g., Length (L),

Mass (M), Time (T)

2

slide-7
SLIDE 7

Motivation

  • Units of Measure m, s, kg...etc
  • Used for measurement, e.g., X is twice as much as a metre
  • Single quantity can have many different units, e.g., metres,

inches, nautical mile, ...etc.

  • Class of representations is a dimension, e.g., Length (L),

Mass (M), Time (T)

  • Normally pick out base units for dimensions, e.g., SI Base

units include kg, m, s, K,...etc Derived Units kgm−2s−2

2

slide-8
SLIDE 8

Dimensional Analysis

3

slide-9
SLIDE 9

Dimensional Analysis

  • +, −, ≤ of two quantities with different dimensions gives a

dimension error

3

slide-10
SLIDE 10

Dimensional Analysis

  • +, −, ≤ of two quantities with different dimensions gives a

dimension error

  • ×, ÷ of two quantities with different dimensions is OK, but

gives new units

3

slide-11
SLIDE 11

Dimensional Analysis

  • +, −, ≤ of two quantities with different dimensions gives a

dimension error

  • ×, ÷ of two quantities with different dimensions is OK, but

gives new units Quantification of units allows us to express this.

3

slide-12
SLIDE 12

Dimensional Analysis

  • +, −, ≤ of two quantities with different dimensions gives a

dimension error

  • ×, ÷ of two quantities with different dimensions is OK, but

gives new units Quantification of units allows us to express this.

  • × : ∀u1.∀u2.num(u1) → num(u2) → num(u1 · u2)

3

slide-13
SLIDE 13

Background

4

slide-14
SLIDE 14

Background

  • Relational Parametricity and Units of Measure

by A. J. Kennedy

4

slide-15
SLIDE 15

Background

  • Relational Parametricity and Units of Measure

by A. J. Kennedy

  • Introduces type system and relational semantics

4

slide-16
SLIDE 16

Background

  • Relational Parametricity and Units of Measure

by A. J. Kennedy

  • Introduces type system and relational semantics
  • ... But no category theory.

4

slide-17
SLIDE 17

Outline

  • Type System for Units of Measure
  • Categorical Semantics
  • Examples and Theorems
  • Parametricity

5

slide-18
SLIDE 18

A Type System for Units of Measure

Unit Context ∆ = u1, ..., un

6

slide-19
SLIDE 19

A Type System for Units of Measure

Unit Context ∆ = u1, ..., un Types e ∈ Ab(∆)

∆ ⊢ e ∆ ⊢ e ∆ ⊢ num(e) Type

6

slide-20
SLIDE 20

A Type System for Units of Measure

Unit Context ∆ = u1, ..., un Types e ∈ Ab(∆)

∆ ⊢ e ∆ ⊢ e ∆ ⊢ num(e) Type ∆ ⊢ T Type ∆ ⊢ U Type ∆ ⊢ T × U Type ∆ ⊢ T Type ∆ ⊢ U Type ∆ ⊢ T → U Type

6

slide-21
SLIDE 21

A Type System for Units of Measure

Unit Context ∆ = u1, ..., un Types e ∈ Ab(∆)

∆ ⊢ e ∆ ⊢ e ∆ ⊢ num(e) Type ∆ ⊢ T Type ∆ ⊢ U Type ∆ ⊢ T × U Type ∆ ⊢ T Type ∆ ⊢ U Type ∆ ⊢ T → U Type ∆, u ⊢ T Type ∆ ⊢ ∀u.T Type

6

slide-22
SLIDE 22

A Type System for Units of Measure

Typing Context Γ = x1 : T1, ..., xm : Tm

7

slide-23
SLIDE 23

A Type System for Units of Measure

Typing Context Γ = x1 : T1, ..., xm : Tm Terms

Usual STλC

7

slide-24
SLIDE 24

A Type System for Units of Measure

Typing Context Γ = x1 : T1, ..., xm : Tm Terms

Usual STλC

and

∆ ⊢ Γ ctxt ∆, u, Γ ⊢ t : T ∆; Γ ⊢ Λu.t : ∀u.T ∆ ⊢ e ∆, Γ ⊢ t : ∀u.T ∆; Γ ⊢ te : T[e/u]

7

slide-25
SLIDE 25

Some Constants

Then add constants, popular choices include...

8

slide-26
SLIDE 26

Some Constants

Then add constants, popular choices include...

  • 0 : ∀u.num(u)

8

slide-27
SLIDE 27

Some Constants

Then add constants, popular choices include...

  • 0 : ∀u.num(u)
  • 1 : num(1)

8

slide-28
SLIDE 28

Some Constants

Then add constants, popular choices include...

  • 0 : ∀u.num(u)
  • 1 : num(1)
  • + : ∀u.num(u) → num(u) → num(u)

8

slide-29
SLIDE 29

Some Constants

Then add constants, popular choices include...

  • 0 : ∀u.num(u)
  • 1 : num(1)
  • + : ∀u.num(u) → num(u) → num(u)
  • × : ∀u1.∀u2.num(u1) → num(u2) → num(u1 · u2)

8

slide-30
SLIDE 30

Where are the Fibrations?

9

slide-31
SLIDE 31

Fibrational Semantics

10

slide-32
SLIDE 32

Fibrational Semantics

A fibration p : E → B with enough structure such that

10

slide-33
SLIDE 33

Fibrational Semantics

A fibration p : E → B with enough structure such that

  • B - Unit contexts and expressions

10

slide-34
SLIDE 34

Fibrational Semantics

A fibration p : E → B with enough structure such that

  • B - Unit contexts and expressions
  • E - Types and terms

10

slide-35
SLIDE 35

A Bit More Detail ...

Start with a fibration p : E → B

11

slide-36
SLIDE 36

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object

11

slide-37
SLIDE 37

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G

11

slide-38
SLIDE 38

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

11

slide-39
SLIDE 39

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

  • ∆; Γ ⊢ T Type ∈ E∆

11

slide-40
SLIDE 40

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

  • ∆; Γ ⊢ T Type ∈ E∆
  • Fibred CCC structure

11

slide-41
SLIDE 41

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

  • ∆; Γ ⊢ T Type ∈ E∆
  • Fibred CCC structure
  • Let num ∈ EG, then ∆ ⊢ num(e) = ∆ ⊢ e∗num.

11

slide-42
SLIDE 42

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

  • ∆; Γ ⊢ T Type ∈ E∆
  • Fibred CCC structure
  • Let num ∈ EG, then ∆ ⊢ num(e) = ∆ ⊢ e∗num.
  • Quantification given by π∗ ⊣ ∀, where π : ∆, u → ∆.

11

slide-43
SLIDE 43

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

  • ∆; Γ ⊢ T Type ∈ E∆
  • Fibred CCC structure
  • Let num ∈ EG, then ∆ ⊢ num(e) = ∆ ⊢ e∗num.
  • Quantification given by π∗ ⊣ ∀, where π : ∆, u → ∆.
  • Terms define morphisms ∆; Γ ⊢ t : T : Γ → T ∈ E∆.

11

slide-44
SLIDE 44

A Bit More Detail ...

Start with a fibration p : E → B

  • G ∈ Ab(B) using Abelian Group Object
  • ∆ ⊢ e : G|∆| → G
  • i.e. u1, u2 ⊢ u1 · u−1

2 (g1, g2) = g1 · g−1 2

  • ∆; Γ ⊢ T Type ∈ E∆
  • Fibred CCC structure
  • Let num ∈ EG, then ∆ ⊢ num(e) = ∆ ⊢ e∗num.
  • Quantification given by π∗ ⊣ ∀, where π : ∆, u → ∆.
  • Terms define morphisms ∆; Γ ⊢ t : T : Γ → T ∈ E∆.

Definition

We call (p, G, num) a UoM-fibration.

11

slide-45
SLIDE 45

...Or More Concisely

12

slide-46
SLIDE 46

...Or More Concisely

Definition

A UoM-fibration (p : E → B, G, num) is given by

12

slide-47
SLIDE 47

...Or More Concisely

Definition

A UoM-fibration (p : E → B, G, num) is given by

  • A λ1-fibration p : E → B

12

slide-48
SLIDE 48

...Or More Concisely

Definition

A UoM-fibration (p : E → B, G, num) is given by

  • A λ1-fibration p : E → B
  • An exponentiable Abelian group object G and

12

slide-49
SLIDE 49

...Or More Concisely

Definition

A UoM-fibration (p : E → B, G, num) is given by

  • A λ1-fibration p : E → B
  • An exponentiable Abelian group object G and
  • An object num ∈ EG

12

slide-50
SLIDE 50

UoM-Fibration Examples

13

slide-51
SLIDE 51

UoM-Fibration Examples

  • Syntax of UoM

(p : E → LAb, 1, num)

where E = Types and Terms

13

slide-52
SLIDE 52

UoM-Fibration Examples

  • Syntax of UoM

(p : E → LAb, 1, num)

where E = Types and Terms

  • UoM-Fibrations from the Usual Fibrations

Codomain, Suboject and Relations fibration over Set are

λ1-fibrations with simple products.

13

slide-53
SLIDE 53

UoM-Fibration Examples

  • Syntax of UoM

(p : E → LAb, 1, num)

where E = Types and Terms

  • UoM-Fibrations from the Usual Fibrations

Codomain, Suboject and Relations fibration over Set are

λ1-fibrations with simple products.

  • Choose Abelian group object, G

13

slide-54
SLIDE 54

UoM-Fibration Examples

  • Syntax of UoM

(p : E → LAb, 1, num)

where E = Types and Terms

  • UoM-Fibrations from the Usual Fibrations

Codomain, Suboject and Relations fibration over Set are

λ1-fibrations with simple products.

  • Choose Abelian group object, G
  • Choose object in fibre above G

13

slide-55
SLIDE 55

UoM-Fibration Examples

  • Syntax of UoM

(p : E → LAb, 1, num)

where E = Types and Terms

  • UoM-Fibrations from the Usual Fibrations

Codomain, Suboject and Relations fibration over Set are

λ1-fibrations with simple products.

  • Choose Abelian group object, G
  • Choose object in fibre above G
  • Unit Erasure Semantics

(p : E → 1, ∗, num)

e.g. E = cpo and num = Q⊥

13

slide-56
SLIDE 56

Theorems About UoM-Fibrations

14

slide-57
SLIDE 57

Theorems About UoM-Fibrations

Theorem

  • (p : E → B, G, X) UoM-fibration
  • A finite products
  • F : A → B product preserving functor
  • G′ ∈ A an Abelian group object with

FG′ = G

14

slide-58
SLIDE 58

Theorems About UoM-Fibrations

Theorem

  • (p : E → B, G, X) UoM-fibration
  • A finite products
  • F : A → B product preserving functor
  • G′ ∈ A an Abelian group object with

FG′ = G Then (F ∗p, G′, (G′, X)) is a UoM-fibration.

14

slide-59
SLIDE 59

Theorems About UoM-Fibrations

Theorem

  • (p : E → B, G, X) UoM-fibration
  • A finite products
  • F : A → B product preserving functor
  • G′ ∈ A an Abelian group object with

FG′ = G Then (F ∗p, G′, (G′, X)) is a UoM-fibration. F ∗E ✲ E

A

F ∗p ❄ F ✲ B p ❄

14

slide-60
SLIDE 60

Theorems About UoM-Fibrations ctd...

15

slide-61
SLIDE 61

Theorems About UoM-Fibrations ctd...

Theorem

Any UoM-fibration can be converted into a UoM-fibration with LAb in the base.

15

slide-62
SLIDE 62

Theorems About UoM-Fibrations ctd...

Theorem

Any UoM-fibration can be converted into a UoM-fibration with LAb in the base. F(1) = G F ∗E ✲ E LAb F ∗p ❄ F ✲ B p ❄

15

slide-63
SLIDE 63

Another Example

Recall an Abelian group G can be thought of as a category G

16

slide-64
SLIDE 64

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗

16

slide-65
SLIDE 65

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗
  • G(∗, ∗) = G

16

slide-66
SLIDE 66

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗
  • G(∗, ∗) = G

A G-Set is a functor φ : G → Set, i.e.,

16

slide-67
SLIDE 67

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗
  • G(∗, ∗) = G

A G-Set is a functor φ : G → Set, i.e.,

  • φ∗ ∈ Set, which we denote |φ|

16

slide-68
SLIDE 68

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗
  • G(∗, ∗) = G

A G-Set is a functor φ : G → Set, i.e.,

  • φ∗ ∈ Set, which we denote |φ|
  • φg : |φ| → |φ|.

16

slide-69
SLIDE 69

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗
  • G(∗, ∗) = G

A G-Set is a functor φ : G → Set, i.e.,

  • φ∗ ∈ Set, which we denote |φ|
  • φg : |φ| → |φ|.

Definition

We call the functor p : Ab-Set → Ab the Ab-Set fibration, where Ab-SetG = [G, Set]

16

slide-70
SLIDE 70

Another Example

Recall an Abelian group G can be thought of as a category G

  • Ob(G) = ∗
  • G(∗, ∗) = G

A G-Set is a functor φ : G → Set, i.e.,

  • φ∗ ∈ Set, which we denote |φ|
  • φg : |φ| → |φ|.

Definition

We call the functor p : Ab-Set → Ab the Ab-Set fibration, where Ab-SetG = [G, Set]

Theorem

The Ab-Set fibration is a λ1-fibration with simple products. Hence, for choices G ∈ Ab, num ∈ Ab-SetG

(p : Ab-Set → Ab, G, num)

is a UoM-fibration

16

slide-71
SLIDE 71

Theorem About Fibrations

17

slide-72
SLIDE 72

Theorem About Fibrations

Theorem

Let E and B be categories with finite products.

17

slide-73
SLIDE 73

Theorem About Fibrations

Theorem

Let E and B be categories with finite products.

  • Suppose that [

] : B → Cat is a product preserving functor.

17

slide-74
SLIDE 74

Theorem About Fibrations

Theorem

Let E and B be categories with finite products.

  • Suppose that [

] : B → Cat is a product preserving functor.

  • p : E → B is a fibration with EX := [X] → D and hence

reindexing is given by precomposition

17

slide-75
SLIDE 75

Theorem About Fibrations

Theorem

Let E and B be categories with finite products.

  • Suppose that [

] : B → Cat is a product preserving functor.

  • p : E → B is a fibration with EX := [X] → D and hence

reindexing is given by precomposition

  • i.e., for any f : X → Y ∈ B,

f ∗(φ : [Y] → D) = φ ◦ [f].

Then, the reindexing of any projection map πX : X × Y → X has a right adjoint π∗

X ⊣ Ran[π] , which satisfies the Beck-Chevalley

condition.

17

slide-76
SLIDE 76

Sketch Proof

18

slide-77
SLIDE 77

Sketch Proof

Lemma

For π : X × Y → X in B and φ : [X] × [Y] → D in EX×Y then

18

slide-78
SLIDE 78

Sketch Proof

Lemma

For π : X × Y → X in B and φ : [X] × [Y] → D in EX×Y then

(Ran[π]φ)x = lim

y∈[Y] φ(x, y)

18

slide-79
SLIDE 79

Sketch Proof

Keep in mind: (Ran[π]φ)x = limy∈[Y] φ(x, y)

19

slide-80
SLIDE 80

Sketch Proof

Keep in mind: (Ran[π]φ)x = limy∈[Y] φ(x, y) Want to show:

19

slide-81
SLIDE 81

Sketch Proof

Keep in mind: (Ran[π]φ)x = limy∈[Y] φ(x, y) Want to show: For any f : X → X ′ in B and

ψ : [X ′] × [Y] → D

in EX′×Y

(RanπX (f × id)∗ψ)x ∼ = (f ∗RanπX′ψ)x

19

slide-82
SLIDE 82

Sketch Proof

Keep in mind: (Ran[π]φ)x = limy∈[Y] φ(x, y) Want to show: For any f : X → X ′ in B and

ψ : [X ′] × [Y] → D

in EX′×Y

(RanπX (f × id)∗ψ)x ∼ = (f ∗RanπX′ψ)x

Use Lemma:

19

slide-83
SLIDE 83

Sketch Proof

Keep in mind: (Ran[π]φ)x = limy∈[Y] φ(x, y) Want to show: For any f : X → X ′ in B and

ψ : [X ′] × [Y] → D

in EX′×Y

(RanπX (f × id)∗ψ)x ∼ = (f ∗RanπX′ψ)x

Use Lemma:

(RanπX (f × id)∗ψ)x ∼ = lim

y∈Y(f × id)∗φ(x, y) ∼

= lim

y∈Y φ(fx, y)

19

slide-84
SLIDE 84

Sketch Proof

Keep in mind: (Ran[π]φ)x = limy∈[Y] φ(x, y) Want to show: For any f : X → X ′ in B and

ψ : [X ′] × [Y] → D

in EX′×Y

(RanπX (f × id)∗ψ)x ∼ = (f ∗RanπX′ψ)x

Use Lemma:

(RanπX (f × id)∗ψ)x ∼ = lim

y∈Y(f × id)∗φ(x, y) ∼

= lim

y∈Y φ(fx, y)

(f ∗RanπX′ψ)x ∼ = lim

y∈Y φ(fx, y)

19

slide-85
SLIDE 85

Summary of Last Few Slides

20

slide-86
SLIDE 86

Summary of Last Few Slides

  • If fibration such that reindexing is given by precomposition

20

slide-87
SLIDE 87

Summary of Last Few Slides

  • If fibration such that reindexing is given by precomposition
  • AND right adjoints are given by right Kan extensions

20

slide-88
SLIDE 88

Summary of Last Few Slides

  • If fibration such that reindexing is given by precomposition
  • AND right adjoints are given by right Kan extensions
  • Then quantification satisfies BC

20

slide-89
SLIDE 89

Summary of Last Few Slides

  • If fibration such that reindexing is given by precomposition
  • AND right adjoints are given by right Kan extensions
  • Then quantification satisfies BC
  • We use this to show the Ab-Set fibration is a UoM-fibration

20

slide-90
SLIDE 90

Results in the Ab-Set Fibration

21

slide-91
SLIDE 91

Results in the Ab-Set Fibration

Lemma

Suppose u ⊢ S, T Type, then

|∀u.S → T| ∼ = Nat(S, T)

21

slide-92
SLIDE 92

Results in the Ab-Set Fibration

Lemma

Suppose u ⊢ S, T Type, then

|∀u.S → T| ∼ = Nat(S, T) Proof.

By end formula for a Kan extension.

21

slide-93
SLIDE 93

Results in the Ab-Set Fibration ctd...

Lemma

Let t : ∀u.num(u) → num(un) for some m, n ∈ N,

22

slide-94
SLIDE 94

Results in the Ab-Set Fibration ctd...

Lemma

Let t : ∀u.num(u) → num(un) for some m, n ∈ N, then for x ∈ |num(u)|

t(g · x) = gn · (tx) ∀g ∈ G

22

slide-95
SLIDE 95

Results in the Ab-Set Fibration ctd...

Lemma

Let t : ∀u.num(u) → num(un) for some m, n ∈ N, then for x ∈ |num(u)|

t(g · x) = gn · (tx) ∀g ∈ G Proof.

Use previous lemma to see t ∈ G-Set(num(u), num(un))

22

slide-96
SLIDE 96

Results in the Ab-Set Fibration ctd...

Lemma

Let t : ∀u.num(u) → num(un) for some m, n ∈ N, then for x ∈ |num(u)|

t(g · x) = gn · (tx) ∀g ∈ G Proof.

Use previous lemma to see t ∈ G-Set(num(u), num(un)) Naturality gives result.

22

slide-97
SLIDE 97

Results in the Ab-Set Fibration ctd...

Corollary

There is no non-trivial term of type ∀u.num(u2) → num(u).

23

slide-98
SLIDE 98

Results in the Ab-Set Fibration ctd...

Corollary

There is no non-trivial term of type ∀u.num(u2) → num(u).

Proof.

Consider (p : Ab-Set → Ab, Z2, Z2),

23

slide-99
SLIDE 99

Results in the Ab-Set Fibration ctd...

Corollary

There is no non-trivial term of type ∀u.num(u2) → num(u).

Proof.

Consider (p : Ab-Set → Ab, Z2, Z2), Then if there were a term t : ∀u.num(u2) → num(u), then

t(g2 · x) = g · (tx) ∀g ∈ Z2

23

slide-100
SLIDE 100

Results in the Ab-Set Fibration ctd...

Corollary

There is no non-trivial term of type ∀u.num(u2) → num(u).

Proof.

Consider (p : Ab-Set → Ab, Z2, Z2), Then if there were a term t : ∀u.num(u2) → num(u), then

t(g2 · x) = g · (tx) ∀g ∈ Z2

Which does not hold, because If t0 = 1 then

t(1 + 1 + 0) = 1 + t(0)

23

slide-101
SLIDE 101

Results in the Ab-Set Fibration ctd...

Corollary

There is no non-trivial term of type ∀u.num(u2) → num(u).

Proof.

Consider (p : Ab-Set → Ab, Z2, Z2), Then if there were a term t : ∀u.num(u2) → num(u), then

t(g2 · x) = g · (tx) ∀g ∈ Z2

Which does not hold, because If t0 = 1 then

t(1 + 1 + 0) = 1 + t(0)

If t1 = 1 then

t(1 + 1 + 1) = 1 + t(1)

23

slide-102
SLIDE 102

Parametric UoM-Fibrations

24

slide-103
SLIDE 103

Parametric UoM-Fibrations

  • B - unit erasure semantics

24

slide-104
SLIDE 104

Parametric UoM-Fibrations

  • B - unit erasure semantics
  • R : LAb → B product preserving functor

24

slide-105
SLIDE 105

Parametric UoM-Fibrations

  • B - unit erasure semantics
  • R : LAb → B product preserving functor

Rel(E) ✲ E LAb × B p ❄ R × ∆ ✲ B × B × B _ × _ × _ ✲ B u ❄ LAb ❄ 1 ❄

24

slide-106
SLIDE 106

Parametric UoM-Fibrations

  • B - unit erasure semantics
  • R : LAb → B product preserving functor

Rel(E) ✲ E LAb × B p ❄ R × ∆ ✲ B × B × B _ × _ × _ ✲ B u ❄ LAb ❄ 1 ❄ Rel(E)n = {(n, B, P) | B ∈ B, P ∈ ER(n)×B×B}

24

slide-107
SLIDE 107

Parametric UoM-Fibrations ctd...

25

slide-108
SLIDE 108

Parametric UoM-Fibrations ctd...

Theorem (r : Rel(E) → LAb, 1, num), for a choice of num, is a UoM-fibration.

25

slide-109
SLIDE 109

Parametric UoM-Fibrations ctd...

Theorem (r : Rel(E) → LAb, 1, num), for a choice of num, is a UoM-fibration.

Rel(E) ✲ E LAb × B p ❄ R × ∆ ✲ B × B × B _ × _ × _ ✲ B u ❄ LAb ❄ 1 ❄

25

slide-110
SLIDE 110

Why Parametric?

26

slide-111
SLIDE 111

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

26

slide-112
SLIDE 112

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

T = (n, T0, T1)

26

slide-113
SLIDE 113

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

T = (n, T0, T1)

with T0 ∈ B and T1 ∈ EGn×T0×T0.

26

slide-114
SLIDE 114

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

T = (n, T0, T1)

with T0 ∈ B and T1 ∈ EGn×T0×T0.

26

slide-115
SLIDE 115

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

T = (n, T0, T1)

with T0 ∈ B and T1 ∈ EGn×T0×T0.

  • T0 as the unit-erasure

semantics of T

26

slide-116
SLIDE 116

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

T = (n, T0, T1)

with T0 ∈ B and T1 ∈ EGn×T0×T0.

  • T0 as the unit-erasure

semantics of T

  • T1 as the relational

semantics of T.

26

slide-117
SLIDE 117

Why Parametric?

For ∆ ⊢ T Type, where |∆| = n

T = (n, T0, T1)

with T0 ∈ B and T1 ∈ EGn×T0×T0.

  • T0 as the unit-erasure

semantics of T

  • T1 as the relational

semantics of T. 1

Γ1

⇓ t1

T1

✯Pn 1

=

Γ0

⇓ t0

T0

✯ B p′ ❄

26

slide-118
SLIDE 118

Conclusions and Future Work

27

slide-119
SLIDE 119

Conclusions and Future Work

  • Units of Measure can be given a fibrational semantics

27

slide-120
SLIDE 120

Conclusions and Future Work

  • Units of Measure can be given a fibrational semantics
  • Nice model using G-sets can exploit naturality properties of

UoM

27

slide-121
SLIDE 121

Conclusions and Future Work

  • Units of Measure can be given a fibrational semantics
  • Nice model using G-sets can exploit naturality properties of

UoM

  • There exist parametric UoM-fibrations

27

slide-122
SLIDE 122

Conclusions and Future Work

28

slide-123
SLIDE 123

Conclusions and Future Work

  • Look more at role of G-sets c.f. nominal sets

28

slide-124
SLIDE 124

Conclusions and Future Work

  • Look more at role of G-sets c.f. nominal sets
  • Invariance properties and symmetries

28

slide-125
SLIDE 125

Conclusions and Future Work

  • Look more at role of G-sets c.f. nominal sets
  • Invariance properties and symmetries
  • ...write thesis...

28

slide-126
SLIDE 126

Thanks for listening.

timothy.revell@strath.ac.uk @timothyrevell

29