-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add fraction reduction rule docs
- Loading branch information
1 parent
ccb575a
commit 17b84e1
Showing
1 changed file
with
48 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Fraction Reduction | ||
|
||
The `Fraction Reduction` rule simplifies fractions by canceling out common factors in the numerator and denominator. This transformation reduces the complexity of expressions and produces equivalent fractions in their simplest form. | ||
|
||
This rule implements the mathematical principle that when a factor appears in both the numerator and denominator of a fraction, it can be canceled out: `(a × c) / (b × c) = a / b` | ||
|
||
## Operations | ||
|
||
**Numeric Fraction Reduction** | ||
|
||
This handles cases where the numerator and denominator contain common numeric factors. For example, `6/3` simplifies to `2`. | ||
|
||
**Variable Cancellation** | ||
|
||
When the same variable appears in both the numerator and denominator, the rule cancels them out: | ||
|
||
- If the powers are equal, the variable is removed completely | ||
- If the powers differ, the variable remains with the difference of the exponents | ||
|
||
For example: | ||
|
||
- `(6x) / (3x)` simplifies to `2` | ||
- `(6x^2) / (3x)` simplifies to `2x` | ||
|
||
**Coefficient Reduction** | ||
|
||
The rule also handles coefficient reduction in conjunction with variable cancellation. It first factors out common terms, then reduces the numerical coefficient to its simplest form. | ||
|
||
For example, `(3x^2) / (6x)` simplifies to `(1/2)x`. | ||
|
||
**Exponent Simplification** | ||
|
||
When variables with exponents appear in both the numerator and denominator, the rule simplifies by subtracting the exponents. | ||
|
||
For example, `x^4 / x^2` simplifies to `x^2`. | ||
|
||
## Implementation Details | ||
|
||
The rule creates a reduced fraction by: | ||
|
||
1. Identifying common factors in the numerator and denominator | ||
2. Reducing the numeric coefficients to their simplest form using GCD | ||
3. Handling variable terms by adjusting their exponents appropriately | ||
4. Constructing a new expression with the simplified terms | ||
|
||
### Examples | ||
|
||
`rule_tests:fraction_reduction` |