\(\Gamma\vdash\) Contexts for

Reasoning & Computing

James B. Wilson Professor of Mathematics

import jave.awt.swing.*

using Tensor from LinearAlgebra

\includepackage{xcolor}

\[\mathbb{N}\,\vdash\,\gcd(2n,2n+1)=1\]

Recap: There are many logics

  • Classical Logic: Every sentence can be judged as True or False.  Useful in the sciences.
  • Intuitionistic Logic: True sentences must be backed by evidence.  Useful in programming.
  • Paraconsistent logic: most statments are just True or just False but for messy situations allow a mix.

Modal Logic: argument about about necessary verses possible.

Linear Logic: arguments that track resources.

...

T/F: The player steps on the line with the ball;

so, they forfeit the ball to the other team.

For truth Context Matters

  • In Basketball stepping on the line forfeits play.
  • In Soccer stepping on the line remains in play.

Programs

Math/Science

Math and logic use a letter separated by \(\vdash\)

 

\[\mathbb{N} \,\vdash\,2+3=5\]

Says in the context \(\mathbb{N}\) of natural numbers, 2+3=5.

 

In context \(\mathbb{Z}_2\) of parity, \[\mathbb{Z}_2\,\vdash\, 2+3=1\] 

import jave.awt.swing.*

using Tensor from LinearAlgebra

\includepackage{xcolor}

Context usually obvious,

at the top include, import &c.

 

Explicit context

Use ctx (or \(\Gamma\)) for unknown context.

Programs

Math/Science

In science often context is in discussion, books & series, titles "Math 156" and conventions.

Implicit context

  • Operating system
  • Runtime
  • Hardware
  • Industry standards

Implicit context

Program addition

Math addition

\[\begin{aligned} x & = \sqrt{2}\\ y &= 30x\\ y-29x & = 30x-29x\\ & = \sqrt{2}\end{aligned}\]

> x = sqrt(2)
1.4142135623730951
> y=30*x
42.42640687119285
> y-29*x
1.4142135623730923
> y-29*x == x
false

The programming context is approximate, that is implicit, and makes sense, but it is not the same as the math context.

Context sets up what logic we have.

  • Implicit context: all assumptions expected to be common and obvious.
  • Explicit context: additional data, operators and claims that are specific to what we are doing.
    • signaled by \(\Gamma\vdash...\) or keywords like import ....

Context for Logic

By James Wilson

Context for Logic

When you set up an argument you place it in a context and that can make all the difference.

  • 155