Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theorem converses #111

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions packages/viewer/src/components/Theorems/Converse.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import context from '@/context'
import { contributingUrl } from '@/constants'
import type { Space, Theorem } from '@/models'
import { Table as Traits } from '../Traits'
import Name from './Name.svelte'
Expand All @@ -18,14 +19,24 @@
$: proof = deduction.prove(converse)
</script>

The converse (
<Name theorem={converse} />)
{#if counterexamples.length > 0}
does not hold, as witnessed by
<Traits spaces={counterexamples} properties={theorem.properties} />
{:else if proof === 'tautology'}
is tautologicially true
{:else if proof}
follows from
<Theorems theorems={proof} />
{:else}cannot be proven or disproven from other known theorems{/if}
<p>
The converse ( <Name theorem={converse} /> )
{#if counterexamples.length > 0}
does not hold, as witnessed by these counterexamples:
<Traits spaces={counterexamples} properties={theorem.properties} />
{:else if proof === 'tautology'}
is tautologicially true
{:else if proof}
follows from these theorems:
<Theorems theorems={proof} />
{:else}
cannot be proven from other theorems or disproven from a counterexample.
{/if}
</p>
{#if counterexamples.length === 0 && !proof}
<p>
<a href={contributingUrl}
>You can learn how to contribute a theorem or counterexample here.</a
>
</p>
{/if}