summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon-Kor <52245124+Simon-Kor@users.noreply.github.com>2024-06-18 17:16:31 +0200
committerSimon-Kor <52245124+Simon-Kor@users.noreply.github.com>2024-06-18 17:16:31 +0200
commite90ffa98ad4fe2f12cff83656de84827e16e3ac4 (patch)
tree0322a5b8a4eef68e2c37cba239e01695c813d3c8
parent9563a18e455469bc64a9a8f61a95fb33f506bed0 (diff)
parent2b2e37e1dc6d74433ef7d455a21f043df8201c3a (diff)
Merge remote-tracking branch 'upstream/main'
-rw-r--r--library/topology/topological-space.tex2
-rw-r--r--source/Megalodon.hs2
-rw-r--r--source/Syntax/Concrete.hs7
3 files changed, 4 insertions, 7 deletions
diff --git a/library/topology/topological-space.tex b/library/topology/topological-space.tex
index c40aba4..73b7ec5 100644
--- a/library/topology/topological-space.tex
+++ b/library/topology/topological-space.tex
@@ -510,5 +510,5 @@
\end{proof}
\begin{definition}\label{neighbourhoods}
- $\neighbourhoods{x}{X} = \{U\in\opens[X] \mid x\in U\}$.
+ $\neighbourhoods{x}{X} = \{N\in\pow{\carrier[X]} \mid \exists U\in\opens[X]. x\in U\subseteq N\}$.
\end{definition}
diff --git a/source/Megalodon.hs b/source/Megalodon.hs
index 37479b2..7e75e6d 100644
--- a/source/Megalodon.hs
+++ b/source/Megalodon.hs
@@ -21,7 +21,7 @@ closure :: [ExprOf VarSymbol] -> ExprOf VarSymbol -> Formula
closure asms stmt = contraction (forallClosure mempty (makeConjunction asms `Implies` stmt))
unAsm :: Asm -> Formula
-unAsm (Asm phi )= phi
+unAsm (Asm phi) = phi
unAsm (AsmStruct x sp) = TermSymbol (SymbolPredicate (PredicateNounStruct sp)) [TermVar x]
buildBlocks :: Lexicon -> [Block] -> Builder
diff --git a/source/Syntax/Concrete.hs b/source/Syntax/Concrete.hs
index bad9635..b51b738 100644
--- a/source/Syntax/Concrete.hs
+++ b/source/Syntax/Concrete.hs
@@ -241,7 +241,7 @@ grammar lexicon@Lexicon{..} = mdo
asmLetStruct <- rule $ AsmLetStruct <$> (_let *> var <* _be <* _an) <*> structNounNameless
asmLet <- rule $ asmLetNoun <|> asmLetNouns <|> asmLetIn <|> asmLetEq <|> asmLetThe <|> asmLetStruct
asmSuppose <- rule $ AsmSuppose <$> (_suppose *> stmt)
- asm <- rule $ assumptionList (asmLet <|> asmSuppose) <* _dot
+ asm <- rule $ andList1_ (asmLet <|> asmSuppose) <* _dot
asms <- rule $ concat <$> many asm
axiom <- rule $ Axiom <$> asms <* optional _then <*> stmt <* _dot
@@ -406,7 +406,7 @@ andList1 item = ((:|) <$> item <*> many (_commaAnd *> item))
-- | Like 'andList1', but drops the information about nonemptiness.
andList1_ :: Prod r Text (Located Token) a -> Prod r Text (Located Token) [a]
-andList1_ item = toList <$> andList1 item
+andList1_ item = NonEmpty.toList <$> andList1 item
commaList :: Prod r Text (Located Token) a -> Prod r Text (Located Token) (NonEmpty a)
@@ -421,9 +421,6 @@ commaList2 :: Prod r Text (Located Token) a -> Prod r Text (Located Token) (NonE
commaList2 item = (:|) <$> item <* _comma <*> commaList_ item
-assumptionList :: Prod r Text (Located Token) a -> Prod r Text (Located Token) [a]
-assumptionList item = NonEmpty.toList <$> andList1 item
-
enumerated :: Prod r Text (Located Token) a -> Prod r Text (Located Token) [a]
enumerated p = NonEmpty.toList <$> enumerated1 p