:: Isosceles Triangular and Isosceles Trapezoidal Membership Functions Using
:: Centroid Method
:: by Takashi Mitsuishi
::
:: Received March 31, 2023
:: Copyright (c) 2023-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies NUMBERS, XBOOLE_0, SUBSET_1, XXREAL_1, CARD_1, RELAT_1, TARSKI,
FUNCT_1, XXREAL_0, PARTFUN1, ARYTM_1, ARYTM_3, COMPLEX1, MEASURE5,
FUZNUM_1, REAL_1, ORDINAL2, XXREAL_2, FUNCT_7, JGRAPH_2, FUNCT_4,
FCONT_1, SQUARE_1, VALUED_1, INTEGRA1, INTEGRA5, SEQ_4, POLYEQ_3, NEWTON,
MSALIMIT, NUMPOLY1, FUZZY_6;
notations TARSKI, XBOOLE_0, SUBSET_1, NEWTON, RELAT_1, NUMBERS, SQUARE_1,
XCMPLX_0, XXREAL_0, COMPLEX1, XREAL_0, RELSET_1, MEASURE5, PARTFUN1,
FUNCT_2, FUNCT_1, FCONT_1, FUNCT_3, INTEGRA1, VALUED_1, FUNCT_4,
COMSEQ_2, SEQ_4, POLYEQ_3, RCOMP_1, INTEGRA5, COUSIN2, FUZNUM_1, FUZZY_6;
constructors SEQ_4, RELSET_1, FCONT_1, FUNCT_4, FUZNUM_1, COMSEQ_2, NEWTON,
INTEGRA5, COUSIN2, POLYEQ_3, FUZZY_6;
registrations RELSET_1, NUMBERS, XXREAL_0, MEMBERED, XBOOLE_0, VALUED_0,
VALUED_1, FUNCT_2, XREAL_0, ORDINAL1, FCONT_1, RELAT_1, FUNCT_4, FUNCT_1,
XCMPLX_0, NAT_1, FUZNUM_1, SQUARE_1, INTEGRA1, NEWTON;
requirements NUMERALS, REAL, SUBSET, ARITHM;
begin
theorem :: FUZZY_7:1
for a,b,c,d
be Real st a < b & b < c & c < d
holds
['a,d'] \ ['b,c'] c= ['a,b'] \/ ['c,d'];
theorem :: FUZZY_7:2
for a,b,c,d
be Real
holds
[. a,d .] \ [. b,c .] c= [. a,b .[ \/ ]. c,d .];
theorem :: FUZZY_7:3
for a,b,c,d
be Real st a < b & b < c & c < d
holds
[. a,d .] \ [. b,c .] c= [. a,b .] \/ [. c,d .];
theorem :: FUZZY_7:4
for p, q, r, s
being Real st p < r & r <= s & s < q
holds
[.r,s.] c< [.p,q.];
begin :: Continuous Functions
theorem :: FUZZY_7:5
for f,g
be Function
of REAL,REAL st
f
is continuous & g
is continuous
holds
max(f,g)
is continuous;
theorem :: FUZZY_7:6
for f,g
be Function
of REAL,REAL st
f
is continuous & g
is continuous
holds
min(f,g)
is continuous;
theorem :: FUZZY_7:7
for A,B
be non empty closed_interval Subset
of REAL
st B c< A
holds
lower_bound A < lower_bound B
or
upper_bound B < upper_bound A;
theorem :: FUZZY_7:8
for A,B
be non empty closed_interval Subset
of REAL st
B c= A
holds
lower_bound A <= lower_bound B & upper_bound B <= upper_bound A;
theorem :: FUZZY_7:9
for r
be Real, f,g
be Function
of REAL,REAL
holds
r (
#) (f +* g) = (r (
#) f) +* (r (
#) g);
reserve A
for non empty Subset
of REAL;
theorem :: FUZZY_7:10
for r
be Real, f
be Function
of REAL,REAL
holds
(r (
#) f) | A = r (
#) (f | A);
theorem :: FUZZY_7:11
for r
be Real, f
be PartFunc
of REAL,REAL st A c= dom f
holds
(r (
#) f) | A = r (
#) (f | A);
theorem :: FUZZY_7:12
for s
be Real, f,g
being Function
of REAL,REAL
holds
( f | ].-infty,s.] ) +* ( g | [.s,+infty.[ )
is Function
of REAL,REAL;
theorem :: FUZZY_7:13
for a,b,r
being Real
holds
r (
#) (AffineMap (a,b)) = AffineMap (r*a,r*b);
theorem :: FUZZY_7:14
for s
be Real, f,g
being Function
of REAL,REAL
holds
dom ( ( f | ].-infty,s.] ) +* ( g | [.s,+infty.[ ) ) = REAL &
dom ( ( f | ].-infty,s.[ ) +* ( g | [.s,+infty.[ ) ) = REAL;
theorem :: FUZZY_7:15
for a,b,c
be Real st b >
0 & c >
0 holds
for x
be Real
holds
( AffineMap ( b/c,b-a*b/c) | ]. -infty,a .]
+* AffineMap (-b/c,b+a*b/c) | [. a,+infty .[ ).x =
b - |. b*(x-a)/c .|;
theorem :: FUZZY_7:16
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = b-|. b*(x-a)/c .|)
holds
f = AffineMap (b/c,b-a*b/c) | ]. -infty,a .]
+* AffineMap (-b/c,b+a*b/c) | [. a,+infty .[;
theorem :: FUZZY_7:17
for a,b
being Real st a >
0 holds
|. AffineMap (a,b) .| = (- (AffineMap(a,b) | ].-infty,(-b)/a.[))
+* (AffineMap(a,b) | [.(-b)/a,+infty.[);
theorem :: FUZZY_7:18
for a,b
being Real st a <
0 holds
|. AffineMap (a,b) .| = ( (AffineMap(a,b) | ].-infty,(-b)/a.[ ))
+* - (AffineMap(a,b) | [.(-b)/a,+infty.[ );
theorem :: FUZZY_7:19
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0, b - |. b*(x-a)/c .|))
holds
for x
be Real st
not x
in ['a-c,a+c']
holds f.x =
0;
theorem :: FUZZY_7:20
for a,b,c
be Real, f,g
be Function
of REAL,REAL st
a < b & b < c
holds
(f | ]. -infty,b .] +* g | [. b,+infty .[ ) | [. a,c .]
= (f | [. a,b .]) +* (g | [. b,c .]);
theorem :: FUZZY_7:21
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 holds
( AffineMap ( b/c,b-a*b/c) | ]. -infty,a .]
+* AffineMap (-b/c,b+a*b/c) | [. a,+infty .[ ) | [. a-c,a+c .]
= AffineMap ( b/c,b-a*b/c) | [. a-c,a .]
+* AffineMap (-b/c,b+a*b/c) | [. a,a+c .];
theorem :: FUZZY_7:22
for a,b,c
be Real, f
be Function
of REAL,REAL st
a < b & b < c & f is_integrable_on ['a,c'] & f | ['a,c']
is bounded
holds
f is_integrable_on ['a,b'] & f is_integrable_on ['b,c'] &
f | ['a,b']
is bounded & ['a,b'] c= dom f &
integral (f,a,c) = (integral (f,a,b)) + (integral (f,b,c));
theorem :: FUZZY_7:23
for a,b,c,d
be Real, f
be Function
of REAL,REAL st
a < b & b < c & c < d &
f is_integrable_on ['a,d'] & f | ['a,d']
is bounded &
for x
be Real st x
in ['a,b'] \/ ['c,d']
holds f.x =
0
holds
centroid(f,['a,d']) = centroid(f,['b,c']);
theorem :: FUZZY_7:24
for A,B
be non empty closed_interval Subset
of REAL,
f
be Function
of REAL,REAL st lower_bound B <> upper_bound B & B c= A &
f is_integrable_on A & f | A
is bounded &
(
for x
be Real st x
in (A \ B)
holds f.x =
0) &
f.(lower_bound B) =
0 & f.(upper_bound B) =
0
holds
centroid (f,A) = centroid (f,B);
begin :: Triangular and Trapezoidal Membership Functions
theorem :: FUZZY_7:25
for a,c
be Real, f
be Function
of REAL,REAL st
c >
0 & (
for x
be Real
holds f.x = max(
0,
1 - |. (x-a)/c .|) )
holds
f
is triangular FuzzySet
of REAL;
theorem :: FUZZY_7:26
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
1 & c >
0 &
(
for x
be Real
holds f.x = min(
1, max(
0, b - |. b*(x-a)/c .|)) )
holds
f
is trapezoidal FuzzySet
of REAL &
f
is normalized FuzzySet
of REAL;
theorem :: FUZZY_7:27
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0, b - |. b*(x-a)/c .|) )
holds
f = b (
#) (TriangularFS (a-c,a,a+c));
theorem :: FUZZY_7:28
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0,b-|. b*(x-a)/c .|))
holds
f
is Lipschitzian;
theorem :: FUZZY_7:29
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
f | ['a-c,a+c'] =
( AffineMap ( b/c,b-a*b/c) |
[. lower_bound ['a-c,a+c'], ((b+a*b/c) - (b-a*b/c))/((b/c)-(-b/c)) .] )
+* ( AffineMap (-b/c,b+a*b/c) |
[. (b+a*b/c - (b-a*b/c))/((b/c)-(-b/c)), upper_bound ['a-c,a+c'] .] )
holds
centroid (f,['a-c,a+c']) = a;
theorem :: FUZZY_7:30
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0, b - |. b*(x-a)/c .|))
holds
f | ['a-c,a+c'] =
( AffineMap ( b/c,b-a*b/c) |
[. lower_bound ['a-c,a+c'], (b+a*b/c - (b-a*b/c))/((b/c)-(-b/c)) .] )
+* ( AffineMap (-b/c,b+a*b/c) |
[. (b+a*b/c - (b-a*b/c))/((b/c)-(-b/c)), upper_bound ['a-c,a+c'] .] );
theorem :: FUZZY_7:31
for a,b,c
be Real, f
be Function
of REAL,REAL st b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0,b-|. b*(x-a)/c .|) )
holds
centroid (f,['a-c,a+c']) = a;
reserve A
for non empty closed_interval Subset
of REAL;
theorem :: FUZZY_7:32
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0,b-|. b*(x-a)/c .|))
holds
f is_integrable_on A & f | A
is bounded;
theorem :: FUZZY_7:33
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 &
(
for x
be Real
holds f.x = max(
0,b-|. b*(x-a)/c .|))
holds
f.(lower_bound ['a-c,a+c']) =
0 & f.(a-c) =
0 &
f.(upper_bound ['a-c,a+c']) =
0 & f.(a+c) =
0;
theorem :: FUZZY_7:34
for a,b,c
be Real, f
be Function
of REAL,REAL st
b >
0 & c >
0 & ['a-c,a+c'] c= A &
(
for x
be Real
holds f.x = max(
0,b-|. b*(x-a)/c .|))
holds
centroid (f,A) = a;
theorem :: FUZZY_7:35
for a,b,c
be Real st a < b & b < c & b-a = c-b
holds
centroid (TriangularFS (a,b,c),['a,c']) = b;
theorem :: FUZZY_7:36
for a,b,c
be Real st a < b & b < c
holds
TriangularFS (a,b,c) is_integrable_on A &
TriangularFS (a,b,c) | A
is bounded;
theorem :: FUZZY_7:37
for a,b,c,d
be Real st a < b & b < c & b-a = c-b & d <>
0 holds
centroid (d (
#) TriangularFS (a,b,c),['a,c']) = b;
theorem :: FUZZY_7:38
for a,b,c,d
be Real st a < b & b < c & c < d
holds
TrapezoidalFS (a,b,c,d) is_integrable_on A &
TrapezoidalFS (a,b,c,d) | A
is bounded;
theorem :: FUZZY_7:39
for a,b,c,d,r
be Real st a < b & b < c & c < d
holds
r (
#) TrapezoidalFS (a,b,c,d) is_integrable_on A;
theorem :: FUZZY_7:40
for a1,c,a2,d
be Real, f
be Function
of REAL,REAL st
c >
0 & d >
0 & a1 < a2 &
f = ( d (
#) TrapezoidalFS (a1-c,a1,a2,a2+c) ) | ['a1-c,a2+c']
holds f is_integrable_on ['a1-c,a2+c'];
theorem :: FUZZY_7:41
for a,b,c
be Real, f,g
be Function
of REAL,REAL,
h
be PartFunc
of REAL,REAL st
a <= b & b <= c & f
is continuous & g
is continuous &
h | [.a,c.] = (f | [.a,b.]) +* (g | [.b,c.]) &
f.b = g.b & [.a,c.] c= dom h
holds
h | [.a,c.]
is continuous;
theorem :: FUZZY_7:42
for a,b,p,q
be Real, f
be Function
of REAL,REAL st a <> p &
f = (AffineMap (a,b)|].-infty,(q-b)/(a-p).]) +*
(AffineMap (p,q)|[.(q-b)/(a-p),+infty.[)
holds
f
is Lipschitzian;
theorem :: FUZZY_7:43
for a,b,c
be Real, f,g,h
be Function
of REAL,REAL st
a <= b & b <= c & f
is continuous & g
is continuous &
h | [.a,c.] = (f| [.a,b.]) +* (g | [.b,c.]) & f.b = g.b
holds
integral((id REAL) (
#) h,['a,c'])
= integral((id REAL) (
#) f,['a,b']) + integral((id REAL) (
#) g,['b,c']);
theorem :: FUZZY_7:44
for a, b, c, d, r
be Real st
a < b & b < c & c < d
holds
(((AffineMap ((
1 / (b - a)),(- (a / (b - a))))) | [.a,b.])) +*
((AffineMap (
0,
1)) | [.b,c.]) +*
((AffineMap ((- (
1 / (d - c))),(d / (d - c)))) | [.c,d.])
= TrapezoidalFS (a,b,c,d) | [.a,d.];
theorem :: FUZZY_7:45
for a, b, c, d, r
be Real st
a < b & b < c & c < d
holds
TrapezoidalFS (a,b,c,d)
= (AffineMap (
0,
0) | (REAL \ ].a,d.[)) +*
TrapezoidalFS (a,b,c,d) | [.a,d.];
theorem :: FUZZY_7:46
for a, b, c, d, r
be Real st
a < b & b < c & c < d
holds
(r (
#) AffineMap (
1 / (b - a),- (a /(b-a)) ) ) | [.a,b.] +*
(r (
#) AffineMap (
0,
1)) | [.b,c.] +*
(r (
#) AffineMap ((- (
1 / (d - c))),(d / (d - c)))) | [.c,d.]
= ( r (
#) TrapezoidalFS (a,b,c,d) ) | [.a,d.];
theorem :: FUZZY_7:47
for a1,c,a2,d
be Real st
c >
0 & d >
0 & a1 < a2
holds
AffineMap(d/c,-(d/c)*(a1 - c)) | [.a1- c,a1.] +*
AffineMap(
0,d) | [.a1,a2.] +*
AffineMap(-d/c, (d/c)*(a2 + c)) | [.a2,a2+c.]
= ( d (
#) TrapezoidalFS (a1-c,a1,a2,a2+c) ) | ['a1-c,a2+c'];
theorem :: FUZZY_7:48
for a1,c,a2,d
be Real st c >
0 & d >
0 & a1 < a2
holds
integral( AffineMap(d/c,-(d/c)*(a1 - c)), ['a1- c,a1']) +
integral( AffineMap(
0,d), ['a1, a2']) +
integral( AffineMap(-d/c, (d/c)*(a2 + c)), ['a2,a2+c']) = d*(a2-a1+c);
theorem :: FUZZY_7:49
for a1,c,a2,d
be Real, f
be Function
of REAL,REAL st
c >
0 & d >
0 & a1 < a2 &
f | [.a1-c,a2+c.] = AffineMap(d/c,-(d/c)*(a1 - c)) | [.a1-c,a1.] +*
AffineMap(
0,d) | [.a1,a2.] +*
AffineMap(-d/c, (d/c)*(a2 + c)) | [.a2,a2+c.]
holds
integral( f,['a1-c,a2+c']) =
integral( AffineMap(d/c,-(d/c)*(a1 - c)), ['a1- c,a1']) +
integral( AffineMap(
0,d), ['a1,a2']) +
integral( AffineMap(-d/c, (d/c)*(a2 + c)), ['a2,a2+c']);
theorem :: FUZZY_7:50
for a1,c,a2,d
be Real st c >
0 & d >
0 & a1 < a2
holds
centroid ( d (
#) TrapezoidalFS (a1-c,a1,a2,a2+c), ['a1-c,a2+c']) =
(a1+a2)/
2;