Is there a way to prove things in Idris without a model?

I am trying to implement the incidence axioms in geometry for the Hilbert plane. And they came up with the following axioms:

interface (Eq point) => Plane line point where
  -- Abstract notion for saying three points lie on the same line.
  colinear : point -> point -> point -> Bool
  coplanar : point -> point -> point -> Bool
  contains : line -> point -> Bool

  -- Intersection between two lines
  intersects_at : line -> line -> point -> Bool
  intersection_def : (contains l a = True) -> (contains m a = True) -> (intersects_at l m a = True)

  -- For any two distinct points there is a line that contains them.
  line_contains_two_points : (a,b : point) -> (a /= b) = True -> (l : line ** (contains l a = True, contains l b = True ))

  -- If two points are contained by l and m then l = m
  two_pts_define_line : contains l a = True -> contains l b = True -> contains m a = True -> contains m b = True -> l = m

  -- There exists 3 non-colinear points.
  three_non_colinear_pts : (a : point ** b : point ** c : point ** (colinear a b c = False, (a /= b) = True, (b /= c) = True, (a /= c) = True))

  -- Any lines contains at least two points.
  contain_two_pts : (l : line) -> (a : point ** b : point ** (contains l a = True, contains l b = True))

I want to show that a line crosses another line no more than once. So I came up with the following statement:

intersect_at_most_one_point : (l, m : line) -> (a : point) -> (intersects_at l m a = True) -> (intersects_at l m b = True) -> a = b

What is read:

Given two lines, if they intersect at two points aand bthen it should be that a = b.

However, I get an error message:

When checking type of Main.intersect_at_most_one_point:
When checking argument x to type constructor =:
        Can't find implementation for Plane line point

, , - data, , . , . , "", , .

- data ?

+4
1

Plane intersect_at_most_one_point:

intersect_at_most_one_point : Plane line point => 
  (l, m : line) -> (a : point) -> 
  (intersects_at l m a = True) -> (intersects_at l m b = True) -> 
  a = b
+1

Source: https://habr.com/ru/post/1691076/


All Articles