def test___init__(self): UnnamedOpetopicSet.Typing( UnnamedOpetopicSet.Variable("x", UnnamedOpetope.OpetopicInteger(2)), self.t) with self.assertRaises(DerivationError): UnnamedOpetopicSet.Typing( UnnamedOpetopicSet.Variable("x", UnnamedOpetope.OpetopicInteger(3)), self.t)
def test___init__(self): UnnamedOpetopicSet.Type( self.s, UnnamedOpetopicSet.Variable("t", UnnamedOpetope.Arrow())) with self.assertRaises(DerivationError): UnnamedOpetopicSet.Type( self.s, UnnamedOpetopicSet.Variable("t", UnnamedOpetope.Point())) UnnamedOpetopicSet.Type(UnnamedOpetopicSet.PastingDiagram.point(), None) with self.assertRaises(DerivationError): UnnamedOpetopicSet.Type(self.s, None)
def setUp(self): self.type_point = UnnamedOpetopicSet.Type( UnnamedOpetopicSet.PastingDiagram.point(), None) self.a = UnnamedOpetopicSet.Variable("a", UnnamedOpetope.Point()) self.b = UnnamedOpetopicSet.Variable("b", UnnamedOpetope.Point()) self.c = UnnamedOpetopicSet.Variable("c", UnnamedOpetope.Point()) self.d = UnnamedOpetopicSet.Variable("d", UnnamedOpetope.Point()) self.ab = UnnamedOpetopicSet.Variable("ab", UnnamedOpetope.Arrow()) self.ac = UnnamedOpetopicSet.Variable("ac", UnnamedOpetope.Arrow()) self.bc = UnnamedOpetopicSet.Variable("bc", UnnamedOpetope.Arrow()) self.cd = UnnamedOpetopicSet.Variable("cd", UnnamedOpetope.Arrow()) self.seq = UnnamedOpetopicSet.Sequent() self.seq.context = UnnamedOpetopicSet.Context() + \ UnnamedOpetopicSet.Typing(self.a, self.type_point) + \ UnnamedOpetopicSet.Typing(self.b, self.type_point) + \ UnnamedOpetopicSet.Typing(self.c, self.type_point) + \ UnnamedOpetopicSet.Typing(self.d, self.type_point) + \ UnnamedOpetopicSet.Typing( self.ab, self.type_arrow("a", self.b)) + \ UnnamedOpetopicSet.Typing( self.ac, self.type_arrow("a", self.c)) + \ UnnamedOpetopicSet.Typing( self.bc, self.type_arrow("b", self.c)) + \ UnnamedOpetopicSet.Typing( self.cd, self.type_arrow("c", self.d))
def setUp(self): self.t = UnnamedOpetopicSet.Type( UnnamedOpetopicSet.PastingDiagram.nonDegeneratePastingDiagram( UnnamedOpetope.OpetopicInteger(2), { UnnamedOpetope.Address.epsilon(1): "a", UnnamedOpetope.Address.epsilon(0).shift(): "b" }), UnnamedOpetopicSet.Variable("t", UnnamedOpetope.Arrow()))
def setUp(self): self.p = UnnamedOpetopicSet.Typing( UnnamedOpetopicSet.Variable("p", UnnamedOpetope.Point()), UnnamedOpetopicSet.Type(UnnamedOpetopicSet.PastingDiagram.point(), None)) self.a = UnnamedOpetopicSet.Typing( UnnamedOpetopicSet.Variable("a", UnnamedOpetope.OpetopicInteger(0)), UnnamedOpetopicSet.Type( UnnamedOpetopicSet.PastingDiagram.degeneratePastingDiagram( UnnamedOpetope.OpetopicInteger(0), "p"), UnnamedOpetopicSet.Variable("p", UnnamedOpetope.Arrow()))) self.b = UnnamedOpetopicSet.Typing( UnnamedOpetopicSet.Variable("b", UnnamedOpetope.OpetopicInteger(0)), UnnamedOpetopicSet.Type( UnnamedOpetopicSet.PastingDiagram.degeneratePastingDiagram( UnnamedOpetope.OpetopicInteger(0), "p"), UnnamedOpetopicSet.Variable("p", UnnamedOpetope.Arrow()))) self.c = UnnamedOpetopicSet.Typing( UnnamedOpetopicSet.Variable("c", UnnamedOpetope.OpetopicInteger(2)), UnnamedOpetopicSet.Type( UnnamedOpetopicSet.PastingDiagram.nonDegeneratePastingDiagram( UnnamedOpetope.OpetopicInteger(2), { UnnamedOpetope.Address.epsilon(1): "x", UnnamedOpetope.Address.epsilon(0).shift(): "y" }), UnnamedOpetopicSet.Variable("z", UnnamedOpetope.Arrow()))) self.ctx = UnnamedOpetopicSet.Context() + self.p + self.a + self.c
def setUp(self): self.a = UnnamedOpetopicSet.Variable("a", UnnamedOpetope.Arrow()) self.b = UnnamedOpetopicSet.Variable("b", UnnamedOpetope.Arrow()) self.i1 = UnnamedOpetopicSet.Variable( "i1", UnnamedOpetope.OpetopicInteger(1)) self.i2 = UnnamedOpetopicSet.Variable( "i2", UnnamedOpetope.OpetopicInteger(2)) self.i3 = UnnamedOpetopicSet.Variable( "i3", UnnamedOpetope.OpetopicInteger(3)) self.c = UnnamedOpetopicSet.Variable( "c", UnnamedOpetope.Graft( UnnamedOpetope.Shift(UnnamedOpetope.OpetopicInteger(2)), UnnamedOpetope.OpetopicInteger(2), UnnamedOpetope.Address.fromList([['*']], 2)))