-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5922ce7
commit f632813
Showing
2 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
<script lang="ts"> | ||
import { checkNegation } from '@/stores/deduction' | ||
import { checkIfRedundant } from '@/stores/deduction' | ||
import context from '@/context' | ||
import type { Space, Property } from '@/types' | ||
import type { Theorem } from '@/models' | ||
import Table from '../Theorems/Table.svelte' | ||
export let space: Space | ||
export let property: Property | ||
const { theorems, traits } = context() | ||
$: result = checkNegation($theorems, space, $traits, property) | ||
let thms: Theorem[] | ||
$: if (result.kind === 'contradiction') { | ||
thms = result.contradiction.theorems | ||
.map(i => $theorems.find(i)) | ||
.filter(t => t !== null) | ||
} | ||
$: result = checkIfRedundant(space, property, $theorems, $traits) | ||
</script> | ||
|
||
{#if result.kind === 'contradiction'} | ||
{#if result.redundant} | ||
<div class="alert alert-warning"> | ||
<strong>Notice:</strong> | ||
This asserted property can be deduced from the other asserted traits for | ||
this space. | ||
This asserted property can be deduced from the other asserted traits for this | ||
space, due to the following theorems. | ||
</div> | ||
<Table theorems={thms} /> | ||
<Table theorems={result.theorems} /> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters