No-code, BigOps, экосистемы: 5 главных технологий для маркетологов на ближайшие 10 лет
Как будут развиваться маркетинговые технологии в ближайшие 10 лет? Анна Амброзевич, спикер WIM.Academy и сооснователь Future Leader, проанализировала новые прогнозы CRM-гуру Скотта Бринкера — и рассказала, можно ли адаптировать эти тренды к российскому рынку. Если кратко, то маркетологам пора работать с маркетплейсами, запускать сервисы через no-code и использовать большие данные во благо бизнеса.

Автор статьи: Анна Амброзевич, спикер WIM.Academy, сооснователь Future Leader, эксперт в области маркетинговых технологий. Более 10 лет в сфере CRM, персонализации и управления данными.
Скотта Бринкера, вице-президента компании HubSpot и главного редактора сайта martech.com, называют «крестным отцом» технологичного маркетинга. Он ежегодно публикует прогнозы отрасли — и 2022 год не стал исключением. В новом отчете авторы (Скотт Бринкер выпустил материал вместе с Джейсоном Болдуин из WPP) раскрывают 5 основных трендов в маркетинговых технологиях на ближайшие 10 лет.
Речь идет не о массовых технологиях для пользователей, таких как 5G и VR, а о маркетинговых решениях для развития бизнеса. Несмотря на нестабильную ситуацию в России, не стоит думать, что эти предсказания для нас больше не актуальны, — глобальные маркетинговые тренды будут влиять и на отечественный рынок даже при некоторых ограничениях.
Вначале важно отметить, что пандемия подтолкнула компании к digital-реорганизации: по словам CEO Microsoft Сатьи Наделлы, всего за 2 месяца произошла такая цифровая трансформация, которая ранее заняла бы 2 года. Бизнес продолжит идти по этому пути и интегрировать в работу новые технологичные подходы.
1. No-code (технологии без программного кода)
No-code — это инструменты, которые дают возможность собрать сайт, приложение или чат-бот с помощью готового конструктора. Не придется привлекать разработчиков, писать код и тратить много ресурсов. Например, это Tilda, Chatfuel, Airtable и т. д. Количество таких решений за последние 10 лет выросло в несколько сотен раз.
Любые воркфлоу, приложения — все это могут создавать обычные пользователи без дорогостоящих разработчиков.
Это позволит автоматизировать и сделать более эффективными большинство процессов в маркетинге, но вместе с тем потребует централизованного управления и контроля.
Важно сказать, что высококлассные специалисты не перестанут пользоваться спросом, они будут востребованы для решения более продвинутых и сложных задач. И, конечно, ключевым функционалом всех no-code-решений будет наличие API для гибкой интеграции с любым другим сервисом или для нативного встраивания в существующую экосистему.
Кстати, для no-code-разработчиков уже существует свой маркетплейс — это проект нашего соотечественника WeLoveNoCode, где пользователи могут найти исполнителей для такого типа задач.
Что делать уже сейчас? Изучите самые популярные no-code-решения для создания своей базы знаний: типы, тарифы и т. д. Какие-то из этих решений вы можете использовать самостоятельно в ближайшее время, а для каких-то можно будет найти исполнителя.
2. Платформы, сети и маркетплейсы. Экосистемная экономика
В нашем быстро меняющемся мире для выживания (в России это приобретает особый смысл) бизнесу необходимы такие качества, как гибкость, адаптивность и устойчивость. Они помогают развивать и упрочивать экосистемы, состоящие из платформ, сетей и маркетплейсов.
Под платформами мы понимаем современные SaaS-решения, такие как HubSpot, Salesforce, InSales и т. д. Ключевая роль платформ в текущем спектре задач — обеспечивать высокую адаптивность, ведь они позволяют быстро запустить актуальные для рынка решения.
Сети позволят компаниям получить доступ к неограниченному количеству ценной информации: источникам новых клиентов, знаний и сотрудников. Самой дальновидной стратегией компании будет создание своей собственной сети: партнеров, клиентов, представителей, стартапов и т. д. Так, например, делает Amazon.
Маркетплейсы уже сейчас создают идеальную среду для взаимодействия поставщиков и конечных покупателей, что и привело к их стремительному росту. Они устанавливают общие правила работы, что снижает риски для обеих сторон. Кроме B2C-маркетплейсов, таких как Ozon, СберМегаМаркет, существуют и B2B — Cargo.one, Alibaba и др.
Интересно, что продавцы и покупатели маркетплейса по факту тоже создают собственную сеть, а многие маркетплейсы созданы на базе готовых платформ. Рекламные площадки уже активно сотрудничают с маркетплейсами, а монетизация данных последних имеет безграничные возможности.

Платформы, сети и маркетплейсы, а также экосистема пользователей вокруг них станут самой большой ценностью, которой может обладать компания.
Лидирующими технологическими компаниями станут те, кто будет включать в себя все эти 3 составляющих. Яндекс, Mail.ru Group и Сбербанк — хорошие примеры такой синергии. По факту такие компании «не выпускают» пользователя из своего контура.
Что делать сейчас? Отслеживайте стратегии развития основных крупных игроков на российском и мировом рынке через публичную информацию и новости, чтобы понимать векторы развития и составы ключевых экосистем.
3. Экспансия мобильных приложений
Количество мобильных приложений в мире поражает воображение. Если в 2011 году на рынке маркетинговых технологий было представлено около 150 решений, то в 2020-м эта цифра приблизилась к 8 000. Рост составил более 5 000%! А к 2030 году прогнозируется несколько миллиардов мобильных приложений, включая так называемые микро- и наноприложения для часов, микрофонов, весов и т. д.
Вместе с ростом рынка приложений происходит и их консолидация за счет таких гигантов, как Сбербанк, Яндекс. Это приводит к монополизации определенных категорий рынка технологий.
С помощью no-code-решений практически любой пользователь или бренд может легко и быстро запустить свое приложение. Это позволит полностью оцифровать взаимодействие с пользователями не только в B2C-сегменте, но и B2B.

Пятикратный рост количества решений для маркетинговых технологий за 10 лет
В то же время распространение умных устройств и высокоскоростная связь между ними позволят создать больше маркетинговых площадок, включая автоматическое создание рекламы. Это запустит новую волну креатива в рекламе и маркетинге.
Что делать сейчас? Проанализируйте, какие приложения уже существуют в вашем бизнесе и на вашем рынке, а каких еще нет. Используя свои знания no-code-рынка (тренд №1), выберите оптимальное решение для создания вашего приложения.
4. От больших данных (Big Data) к большим операционным процессам (BigOps)
2010-е были эпохой господства больших данных, когда потоки постоянно росли в объеме. В 2020-х на первый план выходят большие операционные процессы (BigOps), следующий «слой» мира данных и их растущего объема и многообразия.
Под BigOps мы понимаем экосистему решений по автоматизации обмена данными между различными отделами — маркетинга, продаж, сервисного обслуживания и т. д. Важно не просто собрать все данные в единую систему (с учетом актуального законодательства), обработать их и сделать консистентными, а создать процесс обмена актуальными данными между различными системами в компании. Например, создание профиля клиента — когда все точки касания бренда с ним не только хранятся в единой системе, но и мгновенно доставляются во все каналы коммуникации, в отчетность и отдел клиентского сервиса.
Последние исследования показали, что 44% всех доступных для компаний данных не записываются, а если и записываются, то 43% не используются.
Задача BigOps — извлечь из данных реальную пользу для бизнеса через управление растущим количеством приложений, решениями по автоматизации, процессами и воркфлоу.
Работа с данными в BigOps будет состоять из двух основных этапов:
- Сбор данных из разных источников: точность и актуальность, происхождение и соответствие законодательству, эксклюзивность.
- Эффективная обработка и использование данных в бизнес-процессах и клиентском опыте.

В конкурентной борьбе выиграют те компании, которые сумеют извлечь из данных инсайты и встроить их в операционные процессы в режиме реального времени.
Компаниям нужно будет инвестировать в обучение своих сотрудников в области работы с данными (data-грамотность), так как это станет одним из важнейших hard skills будущего. Однако законодательство и этика будут ограничивать количество доступной информации о клиентах, поэтому маркетологам придется находить золотую середину в таргетинге и персонализации.
К 2025 году количество провайдеров данных и продуктов для работы с данными будет расти на 25% в год. Альянсы и экосистемы данных будут играть еще более важную роль в маркетинговых процессах и потребуют более серьезного регулирования работы с данными.
Что делать сейчас? Проанализируйте текущий статус работы с данными в вашей компании: какие из них не используются, поступают ли данные во все отделы в актуальном и полном виде и т. д. Начните строить BigOps процессы.
5. Гармония между людьми и машинами
В мае 2020 года опрос среди маркетологов показал: 59% из них переживают, что ИИ и машинное обучение будут препятствием для их личного роста (в 2019 году эта цифра составляла 14%).
Искусственный интеллект не заменит человека в маркетинге в этом десятилетии, но даст возможность перераспределить свои ресурсы и время в пользу работы со стратегией, инновациями, креативом и эмпатией по отношению к клиентам, коллегам и сотрудникам. То есть в те сферы бизнеса, которые машина и автоматизация охватить не смогут.
Можно выделить 3 основных вида взаимодействия между людьми и машинами в digital-мире:
1. Человек + человек
Звонки, электронная почта, живые встречи и чаты с оператором. Эта модель взаимодействия между клиентом и брендом и дальше будет актуальной, особенно для сфер бизнеса, основанных на высоком уровне персонального сервиса и личных отношениях. В данном формате технологии будут играть поддерживающую роль: сотрудники отдела продаж будут обучаться с помощью ИИ-сервисов с персональными рекомендациями и релевантным контентом. А клиенты будут использовать своих AI-помощников для поиска наиболее выгодных предложений и условий сервиса.
2. Человек + машина
Электронная коммерция и чат-боты, где человек общается с машиной-продавцом. В данном случае человек на стороне продавца играет поддерживающую роль — он лишь управляет клиентским опытом и подключается в нестандартных случаях. В данном случае клиенты также будут использовать умных помощников.
3. Машина + машина
Покупатели делегируют процесс покупки своим AI-помощникам, которые будут взаимодействовать по API с машинами продавца. Это называется bot commerce — такой тип взаимодействия требует другого вида дизайна и оптимизации от маркетологов. Вместо UX (где мы работаем с опытом пользователя) фокус будет смещен на BX (опыт для бота), в данном случае нужно будет создавать опыт для робота. Пример такого типа взаимодействия — SEO, где сайт общается с поисковым движком.

Что делать сейчас? При создании стратегии обязательно учитывайте цифровизацию ваших покупателей и тренды современных технологий в маркетинге. Кроме этого, проанализируйте, какие текущие процессы вы можете автоматизировать и делегировать ИИ.
Итак, каждый из этих пяти трендов по-своему повлияет на возможности маркетологов: они смогут создавать инновации, экспериментировать и анализировать по-новому. Важно держать руку на пульсе, изучать технологии и думать, какие из них можно и нужно внедрять в свои стратегии в самое ближайшее время.
Hq (high quality)

2023 год стал для нас годом развития и прошёл под лозунгом «Чтобы оставаться на месте, нужно бежать изо всех сил. Чтобы двигаться вперёд – нужно бежать в два раза быстрее». Благодарим всех, кто выбирал нас, верил, поддерживал и был рядом.

Кейс крупного банка. Специалисты банка искали новые инструменты для удержания и повышения эффективности работы сотрудников.
О деталях проекта читайте в разделе КЕЙСЫ.

Спасибо, что вы с нами, и спасибо, что вы есть!
Счастливого нового года!

Кейс российской авиакомпании о том, как делать программы развития сотрудников более адресными и сформированными по интересам сотрудников.
О деталях проекта читайте в разделе КЕЙСЫ.

В горно-металлургической компании решили пересмотреть подход к отбору управленцев в кадровый резерв.
О деталях проекта и как была решена задача, читайте в разделе КЕЙСЫ

Кейс развивающейся IT-компании. Клиенту нужен был гибкий и лёгкий аналог ИПР, на внедрение которого не требуется много средств и ресурсов.
О деталях проекта читайте в разделе КЕЙСЫ

30 ноября Елена и Екатерина Воскресенские, эксперты HT Lab в области обучения и развития персонала, и Елена Лустина, приглашённый сертифицированный MBTI-практик и бизнес-тренер, поделятся, как тест помогает в задачах развития и удержания ценных сотрудников.

С одним из крупнейших российских банков мы решили изучить связь между результатами тестирования и KPI сотрудников. В совместном проекте выявили различия между эффективными и непродуктивными сотрудниками.

9 ноября Елена и Екатерина Воскресенские, эксперты HT Lab в области обучения и развития персонала, поделятся, как тест помогает в оценке управленческого потенциала сотрудников и отборе в кадровый резерв.

Мы открываем для вас двери Лаборатории развития HT Lab и приглашаем в ноябре отправиться в развивающее путешествие. На этом пути вас ждут вебинары, подкасты, интервью и демо-сессии.

При реализации задуманного HR-специалисты столкнулись с рядом проблем, которые не давали получить максимум пользы от планов развития.
О деталях проекта и как была решена задача, читайте в разделе КЕЙСЫ

Портал Большой Российской Энциклопедии опубликовал статью об Александре Георгиевиче Шмелёве.

25 октября с приглашёнными спикерами разберём реальные кейсы и инсайты, которые получили при работе с командами, представим комплексную технологию Джаз-коучинг и обменяемся опытом с коллегами из разных сфер.

Между отделом маркетинга и отделом продаж были проблемы во взаимодействии. Каждый из отделов приписывал заслуги себе, а неудачи считал результатом работы соседнего подразделения. Сотрудники конкурировали между собой и намеренно мешали друг другу в достижении целей.
Как коучинг помог разобраться в бизнес-процессах, найти точки соприкосновения и объединить команды — читайте в нашем КЕЙСЕ

2 октября в Центре Международной Торговли в Москве состоится Глобальный HR-форум «Персонал Экспо 2023».
Готовим для вас подарки, интересные активности и представим новые продукты. Приходите пообщаться, вдохновиться и, возможно, найти те самые ответы!

29 сентября с приглашенными спикерами разберем реальные кейсы и типичные проблемы выгорания на работе, методы диагностики, реабилитации и профилактики, представим свою технологию работы с выгоранием в компаниях, которую вы сможете проверить на себе первыми бесплатно, и обменяемся опытом с коллегами из разных сфер по данной теме!

Кейс IT-компании. Собственник хотел сократить своё присутствие в операционной деятельности и сделать работу команды более автономной.
О деталях проекта читайте в разделе КЕЙСЫ

Результаты квиз-теста «Специалисты vs Руководители». Расскажем, в каких психологических факторах легко ошибиться при самостоятельном составлении идеального психологического профиля руководителя.

Цены на продукты и услуги HT Lab пересматриваются два раза в год — 1 марта и 1 сентября. Мы заранее предупреждаем об изменении цен, чтобы вы могли спланировать закупку методик по максимально выгодным условиям.

Делимся результатами исследования цифровых инструментов оценки персонала, которое проводила компания «Сотер» совместно с hh.ru, при нашей поддержке.
Scott Brinker: From Big Data to Big Ops

Now, this is the big one. Scott Brinker himself is here to bless our eyes, ears, and anything in-between with his insight on big data and big ops.
So, let’s see what Scott’s got. And what Scott’s got, is a lot. And it’s hot. Sorry, I’ll stop messing around.
And if after this, you’re still not Scott-ed out, check out our latest interview with the Godfather of martech here. We delve into topics like the martech industry, the effects of the pandemic (of course), the challenges of martech, and more.
This sesh, if you were lucky enough to catch it, went into depth about the new foundations of marketing and customer experience.
But in case you haven’t heard of him, sacrilegious as that is, Scott is the editor of chiefmartec.com, the VP Platform Ecosystem at HubSpot, and is the best selling author of ‘Hacking Marketing’.
And, most notably, he’s the mastermind behind the Marketing Technology landscape since 2011. And he’s been standing side-by-side with the industry as it’s grown 5,233% since 2011. In fact, we’ve seen the number of martech solutions grow from 150, to 8,000 in just under a decade.

But the truth is, says Scott, that’s just the tip of the iceberg. In fact, more than 500m digital apps and services will be developed and deployed using cloud native approaches by 2023.
Not all of these will be commercially packaged apps like the ones on the martech landscape. But the vast majority will be custom apps, built for individual companies.
This is not our story today, but the catalyst. In fact, we are in an era moving away from big data, to the era of big ops.
So, how do we go from big data, with a scale and complexity of data collected, stored and analysed, to big ops, with the scale and complexity of apps and automation interacting with data.
Scott asks us to consider it this way. If you think of data as this big data lake, far away, where you need a professional guide to help you find it, and hike up to it. Big ops is instead like an interactive water park.
And this interaction is key. Though data is growing, the interactions with it are growing even faster.

This is triggered by a proliferation of ops related functions inside the modern digital business.
Okay, let’s stop listing these. Just take a peep at this behemoth of a graph:

So, Scott turned to his twitter followers to clarify the roles, and asked «What do other people think ‘ops’ roles do?»
- «Buy ALL the tools»
- «We say NO a lot»
- «Send emails all day»
- «Put milk & cookies out for the magic elves who come in at night and do all the hard work»
and Scott’s favourite:
I am a laptop-wielding technology-wizard marketing Rockstar who’s beloved by all.»
Let’s start with DevOps.
Basically, this meme sums it up.

But this is no joke. Okay, that’s a little bit of a joke. But this is an actual problem.
Software used to be developed by software engineers, and then handed over to deployment. But this slowed stuff down, and encouraged finger pointing.
So, DevOps became all about embedding ops responsibility with the development teams.
But what does this have to do with marketing?
Websites & web apps. Mobile Apps. Product-Led Growth. Custom-developed martech. All of this is software. All of this is relevant to marketing.
Scott moves on to the custom martech side. He referenced research from our martech report (download here), specifically asking respondents «What best describes your organisation’s customer/ marketing data platform?»
Now this is interesting, Scott says. 16% of respondents reported their platform is self built, either in-house or custom developed. 38.5% reported a hybrid platform, in-house or custom developed, and with vendor solutions. This totals to 54.5%.
Scott said someone on Twitter joked that half of this is probably spreadsheets (and they might not be 100% wrong). But there’s still a lot of development happening.
But what Scott wants to do is to pull themes from DevOps.
The Three Themes of DevOps
Number One: Agile Culture
This accelerates the loop, to be able to develop, deploy, learn. And repeat. It’s about bringing the agile cycle up to speed, and has been adapted for marketing.
In fact, 51% of marketing departments are using at least some parts of an agile marketing approach in 2021.
Number Two: Shifting left
This involves moving responsibilities in the ‘Dev’ of ‘DevOps’. But this shift is also happening within marketing, with the growth of no-code marketing ‘superpowers’, for providing non-technical marketers the ability to perform «no-code» capabilities.
- Automation. This means being able to automate activities and processes.
- Augmentation. This means being able to be imbued with new powers to create and analyse.
- Integration. This means being able to be connected to other tools and data.
A big part of all this is automation.
Number three: Automation
This is certainly something that’s been seen in the DevOps world, with 90% of high-maturity DevOps teams have automated the most repetitive tasks, compared to only 25% for low-maturity DevOps teams.
The department with the largest number of automation is not surprisingly IT and Engineering, with 39.8%. But what is surprising is the second is Finance (26.4%) and the third is sales and marketing (13.3%).
This gets us into data ops.
Data Ops
There are so many water-themed references in this space, Scott says. Data Lake, Data Stream, Data Cloud, and when it’s bad — Data Swamp.
But there’s a few lesser known data water metaphors. These are:
- Data Bourne — Stored identity data
- Data Creek — Trickle-down data
- Data Fjord — Steep learning curve data
- Data Gulf — Can’t quite reach the data
- Data Moat — Unique Competitive data
- Data Puddle — Excel Spreadsheet
And there’s one more water metaphor. The Water Cycle. You’ll find there’s a similar ecosystem for data.

So, you’ll see the data being all pooled around. Another water reference.
And it wouldn’t be a S.B presentation without some sort of landscape:

And this is just a sample.
Next up, two ideas from Data Ops, which are relevant to all Big Ops.
Two Ideas from DataOps
Number One: Aggregation
First up, its aggregation over consolidation. But what’s the difference?
Well, consolidation is about reducing a lot of different sets of things, into a smaller number of things, or just one.
Aggregation, on the other hand, is making a large set of things easier to consume or access through a single source.


For example, Social media platforms are highly consolidated, but have millions of social creators.

So, this is something Scott’s looked at with martech.
«With integration, we have the mechanisms to do aggregation» at the data level, workflow, UI, and governance, he says.

So, you see aggregation in the following layers:
- Data: Data warehouses/data Lakes; specialised data; shared spreadsheets.
- Workflow (logic): iPaaS, Workflow Automation and BPM; Robotic Process Automation; Data Pipelining and ETL automation.
- UI (presentation): Shared collaboration tools; Shared analytics tools; Domain platforms.
- Governance: SaaS management; Privacy and data governance; Identity access management.
What’s exciting about this aggregation, says Scott, is that it’s taking us from an age where fragile tech stacks break when new apps or data is added, to antifragile stacks which gain value from new apps and data.
This is because aggregation platforms get more value as more is added, as they have more things to aggregate through them.
This is how we make our tech stacks as agile as the rest of our business needs to be.
Number Two: Reintegration of Martech
The CMO council asked a number of c-suite leaders «Where do you see leadership holes or gaps in your marketing organisation?»
- 42% said modernisation of marketing organisation, systems, and operations
- 40% said proficient, technically savvy managers in key digital roles
- 37% report it to be greater customer knowledge and market understanding
- 34% claim adaptive, informed decision-making based on good data
Actually all these things are all related around the technology and data infrastructure of marketing»
How did marketing fall behind?
In many ways martech was leading the charge of digitisation of modern business, says Scott.
Well, the truth is the rest of the organisation has caught up with its maturity. And increasingly there’s a demand for martech to be re-integrated into the rest of the IT platform.
That doesn’t mean that marketing won’t have some of their own tools, but these tools need to integrate with the other enterprise systems. And in some cases where there’s universal enterprise systems that work for marketing needs too, so there’s a need to be able to take advantage of them seamlessly.
And finally, we have:
RevOps
This involves pooling together marketing ops, partner ops, and sales ops. We can go back to the meme, he says:


In many ways, Scott suggests, the relationship between marketing and sales, and customer success, is often like the parable of the blind men and an elephant. No, it’s not about an elephant being trained as a service animal.
Instead, the men are all touching a different piece, and describe what they see, with very mixed perspectives. So, in our case, it translates to ‘the parable of the blind department and a customer’. Or mis-aligned systems and data, and processes.
And really, at its heart, RevOps is about aligning systems and data, and processes, across marketing, sales and customer service.
A way to look at the power of RevOps is to look at the seven roles that it can play in the modern organisation.
«RevOps sitting above these three departments can be the cartographer of the entire customer journey», not just through marketing or sales, but the end-to-end, says Scott.
What’s exciting is all seven of these roles are all connected to the data that is being managed.
The other roles include:
- Cartographer of the customer journey map. mapping the context of data.
- Curator of the customer data and assets. standardising data organisation.
- Architect of customer systems and services. generating and processing data.
- Orchestrator of processes and automations. building data-triggered workflows.
- Analyst of insights and performance. analysing and refining data.
- Outfitter of self-service capabilities. enabling self-service use of data.
- Guardian of quality and compliance. assuring data quality and compliance.
How do DevOps, DataOps and RevOps all connect?
Scott believes that we are early on in this journey of big ops, and that’s what’s exciting about this.
Just as many marketing operations and marketing tech people led this first generation of the martech revolution, the second generation of the martech revolution, in a much larger context of big ops, has so much opportunity”
He leaves us with this quote from MarTech Alliance fave Darrell Alfonso:
Что такое hq и bigops
Add LoadPath «./interval». Require Import ssreflect ssrnat seq fintype ssrbool eqtype ssrfun bigops matrix ssralg . Require Import Reals. Require Import Fourier. Require Import Rstruct. Set Implicit Arguments. Unset Strict Implicit. Import Prenex Implicits. Delimit Scope ring_scope with Ri. Delimit Scope nat_scope with Dn. (* — general results on the set of indexes; — lemmas for min and max on reals; — some results on sums, complements to bigops *) Section BigOpRel. Variables (R : Type) (Prel : R ->R-> Prop). Variables (nil : R) (op1 : R -> R -> R). Variable (fu: R -> R). Hypothesis (fu_nil: Prel (fu nil) ( nil)) (rel_trans: forall a b c, Prel a b->Prel b c-> Prel a c) (fu_rel1: forall a b c, Prel b c -> Prel (op1 a b) (op1 a c) ) (fu_rel: forall a b, Prel (fu (op1 a b)) (op1 (fu a) (fu b))). Lemma big_op_rel_seq: forall I (r : seq I) (P:I -> bool) F , Prel ( fu (\big[op1/nil]_(i I r P F; rewrite unlock ; elim: r => //= i r Hr. case e: (P i);[apply rel_trans with (op1 (fu (F i)) (fu (foldr (fun (i0 : I) (x : R) => if P i0 then op1 ( (F i0)) x else x) nil r))); [apply fu_rel| apply fu_rel1;apply Hr]| apply Hr]. Qed. Lemma big_op_rel: forall (I:finType) (P: pred I) F , Prel ( fu (\big[op1/nil]_(i | P i) F i)) (\big[op1/nil]_(i | P i) fu (F i)). Proof. move=> I P F ; apply big_op_rel_seq => i; rewrite mem_enum. Qed. End BigOpRel. Implicit Arguments big_op_rel_seq [R nil op1 I r P F]. Implicit Arguments big_op_rel [R nil op1 I P F]. Section BigRel2. Variables (R1 : Type) (rel : R1 ->R1-> Prop). Variables (nil1 : R1) (op1 : R1 -> R1 -> R1). Hypothesis (rel_sym : forall x, rel x x) (relP : forall a x b y, rel a x -> rel b y -> rel (op1 a b) (op1 x y)) (rel_trans : forall b a c, rel a b->rel b c-> rel a c). Variables (R2 : Type) (nil2 : R2) (op2 : R2 -> R2 -> R2) (f : R2 -> R1). Hypothesis (f_nil : (f nil2) = (nil1)) (f_morph : forall a b, rel (f (op2 a b)) (op1 (f a) (f b))). Lemma big_morph_rel_seq : forall I (r : seq I) (P :I -> bool) F, rel (f (\big[op2/nil2]_(i I r P F. elim: r => //= [|a r Hr]; [by rewrite ?big_nil f_nil| rewrite ?big_cons/=]. case e: (P a); last (apply: Hr). apply: (@rel_trans (op1 (f (F a)) (f (\big[op2/nil2]_(j I P F; apply: big_morph_rel_seq => i; rewrite mem_enum. Qed. End BigRel2. Implicit Arguments big_op_rel_seq [R nil op1 I r P F]. Implicit Arguments big_op_rel [R nil op1 I P F]. Section aux_index. Variable p: nat. Lemma ord1_0: forall i: ‘I_1, i = ord0. move=> i; case: i => k Hk; apply: ord_inj; rewrite /=; move/leP: Hk => hk; omega. Qed. Lemma I0_seq0: enum ‘I_O = Nil _. Proof. have H1: ‘I_0 =1 pred0. move=> x. have h2:= ltn_ord x. move/ltP:h2=>H2. have h3: ~(x Nil _ !=enum ‘I_p. Proof. move=> q Hq. apply/negP. unfold not => Heq. move/eqP: Heq=>Heq. have H: size (@Nil ‘I_q) = size (enum ‘I_q). by rewrite Heq. rewrite <1>/size size_enum_ord in H. have H1:= Hq. rewrite lt0n H in H1. by move/eqP: H1 => H1; apply H1. Qed. Definition I0 (pr: (01>
pr; move: (I_not_void pr). elim (enum ‘I_p) => //. Defined. Lemma last_cons: forall r (x: R), r !=[::] -> last 0 r = last 0 (x :: r). Proof. move=> s x Hs. rewrite last_cons. move: Hs; case s; first by done. by move=> i s’ _ ; rewrite !last_cons. Qed. End aux_index. Section min_max_prop. Lemma max_le: forall a b c d, a b Rmax a b a b c d Hac Hbd. destruct (Rle_or_lt a b); destruct (Rle_or_lt c d). replace (Rmax a b) with b; replace (Rmax c d) with d; first by fourier. unfold Rmax; case (Rle_dec ); auto with real. unfold Rmax; case (Rle_dec a b); auto with real. unfold Rmax; case (Rle_dec c d); auto with real. replace (Rmax a b) with b; replace (Rmax c d) with c;first by fourier. unfold Rmax; case (Rle_dec c d); auto with real. unfold Rmax; case (Rle_dec a b); auto with real. unfold Rmax; case (Rle_dec c d); auto with real. replace (Rmax a b) with a; replace (Rmax c d) with d;first by fourier. unfold Rmax; case (Rle_dec c d); auto with real. unfold Rmax; case (Rle_dec a b); auto with real. unfold Rmax; case (Rle_dec c d); auto with real. replace (Rmax a b) with a; replace (Rmax c d) with c;first by fourier. unfold Rmax; case (Rle_dec c d); auto with real. unfold Rmax; case (Rle_dec a b); auto with real. unfold Rmax; case (Rle_dec c d); auto with real. Qed. Lemma Rmax_assoc: forall x y z, Rmax x (Rmax y z) = Rmax (Rmax x y) z. Proof. move=> x y z. destruct (Rle_or_lt x y); destruct (Rle_or_lt y z); destruct (Rle_or_lt x z). replace (Rmax y z) with z; [|unfold Rmax; case Rle_dec; auto with real]. replace (Rmax x y) with y; [|unfold Rmax; case Rle_dec; auto with real]. replace (Rmax x z) with z; [|unfold Rmax; case Rle_dec; auto with real]. replace (Rmax y z) with z; [|unfold Rmax; case Rle_dec; auto with real]. done. have Hcontr: x Rmax r1 r2 = r1. Proof. move=> r1 r2 H; rewrite /Rmax; case (Rle_dec r1 r2); auto with real. Qed. Lemma Rmax_right: forall r1 r2, r1 Rmax r1 r2 = r2. Proof. move=> r1 r2 H; rewrite /Rmax; case (Rle_dec r1 r2); auto with real. Qed. Lemma Rmax_le: forall r1 r2 r, r1 r2 Rmax r1 r2 r1 r2 r H1 H2; rewrite /Rmax; case (Rle_dec r1 r2) =>H; fourier. Qed. Lemma Rmax_le2: forall r1 r2 r, r1 Rmax r1 r2 r1 r2 r; split; [move=> [H1 H2]|]; rewrite /Rmax; case (Rle_dec r1 r2) =>H; [fourier|fourier| move=> H1; split; fourier|move=> H1; split;[|apply Rle_trans with r1; [left; apply Rnot_le_lt|]]]. Qed. Lemma Rmax_Rlt_el: forall r1 r2 r, r r r1 r2 r; split . by rewrite /Rmax; case (Rle_dec r1 r2) =>H0 H; [right|left]. move=> H; case H => H1. by apply Rlt_le_trans with r1; [| apply RmaxLess1]. by apply Rlt_le_trans with r2; [| apply RmaxLess2]. Qed. Lemma Rmax_ge: forall r1 r2 r, r r r r1 r2 r H1 H2; rewrite /Rmax; case (Rle_dec r1 r2) =>H; fourier. Qed. Lemma rmax4: forall r1 r2 r3 r4, r1 r3 Rmax r1 r3 r1 r2 r3 r4 H12 H34. rewrite /Rmax; case (Rle_dec r1 r3); case (Rle_dec r2 r4); auto with real. move => H1 H2. apply Rle_trans with r4; auto with real. move => H1 H2; by apply Rle_trans with r2. Qed. Lemma Rmax_le_compat: forall a b c, b Rmax a b a b c Hbc. rewrite /Rmax. case ( Rle_dec a b); case (Rle_dec a c ) => H J . done. by elim H; apply Rle_trans with b. done. by right. Qed. Lemma Rmax_Rplus_le_compat: forall a b c , 0 Rmax (a + b) c a b c; rewrite /Rmax. case (Rle_dec (a + b) c); case (Rle_dec a c); case ( Rle_dec b c) => H J K Hc; try fourier. have H’ := Rnot_le_lt _ _ H; fourier. have H’ := Rnot_le_lt _ _ J; fourier. have H’ := Rnot_le_lt _ _ J. have H» := Rnot_le_lt _ _ H. elim (RIneq.Rle_not_lt _ _ K);fourier. Qed. Lemma Rmax_Rplus_le_compat2: forall a b c d, Rmax (a + b) (c + d) a b c d; rewrite /Rmax. case (Rle_dec (a + b) (c+d)); case (Rle_dec a c); case ( Rle_dec b d) => H J K ; try fourier. have H’ := Rnot_le_lt _ _ H; fourier. have H’ := Rnot_le_lt _ _ J; fourier. have H’ := Rnot_le_lt _ _ J. have H» := Rnot_le_lt _ _ H. elim (RIneq.Rle_not_lt _ _ K); fourier. Qed. Lemma Rmin_assoc: forall x y z, Rmin x (Rmin y z) = Rmin (Rmin x y) z. Proof. move=> x y z. destruct (Rle_or_lt x y). replace (Rmin x y) with x ; [|unfold Rmin; case Rle_dec; auto with real]. destruct (Rle_or_lt y z). replace (Rmin y z) with y; [|unfold Rmin; case Rle_dec; auto with real]. replace (Rmin x y) with x;[|unfold Rmin; case Rle_dec; auto with real]. have H1: x Rmin r1 r2 = r1. Proof. move=> r1 r2 H; rewrite /Rmin; case (Rle_dec r1 r2); auto with real. Qed. Lemma Rmin_right: forall r1 r2, r2 Rmin r1 r2 = r2. Proof. move=> r1 r2 H; rewrite /Rmin; case (Rle_dec r1 r2); auto with real. Qed. Lemma Rmin_le: forall r1 r2 r, r1 r2 Rmin r1 r2 r1 r2 r H1 H2; rewrite /Rmin; case (Rle_dec r1 r2) =>H; fourier. Qed. Lemma Rmin_ge: forall r1 r2 r, r r r r1 r2 r H1 H2; rewrite /Rmin; case (Rle_dec r1 r2) =>H; fourier. Qed. Lemma Rmin_split: forall a b, Rmin a b = a \/ Rmin a b = b. Proof. by move=> a b; rewrite /Rmin; case (Rle_dec a b) => Hab; [left|right]. Qed. End min_max_prop. Section min_max_big. Lemma big_max_le: forall (r:seq R) (F: R -> R) i0, i0 \in r -> F i0 r F i0 Hi0. have Hnul: r != [::]. apply/eqP=> Hr; rewrite Hr in Hi0 . have Hr2:= @in_nil _ i0. by rewrite Hi0 in Hr2. move: Hnul Hi0; elim r; first by done. move=> i s IHs _ Hri0. rewrite big_cons. case Hi: (i0 == i). move/eqP: Hi => Hi; rewrite Hi; apply RmaxLess1 . apply Rle_trans with (\big[Rmax/F (last 0 (i :: s))]_(j Hr; rewrite Hr in Hri0 . have Hr2:= @in_nil _ i0. by rewrite Hri0 in Hr2. by rewrite -(last_cons i Hnul); apply IHs. Qed. Lemma big_max_exists: forall (r:seq R) (F: R -> R), r != [::] -> i0 s Ih _. case Hs: (s != [::]). elim (Ih Hs) => i1 [Hi0 Hi1]. elim (Rle_dec (F i0) (F i1)) => Hdec. exists i1; split. by rewrite in_cons; rewrite Hi0; apply orbT. by rewrite big_cons -(last_cons i0 Hs) Hi1 Rmax_right. exists i0; split; [apply mem_head|rewrite big_cons -(last_cons i0 Hs) Hi1 Rmax_left;[done|]]. by left; apply: Rnot_le_gt. exists i0; rewrite big_cons. by move/eqP: Hs => Hs; split; [apply mem_head|rewrite Hs big_nil /last //= Rmax_right; [|right]]. Qed. Lemma big_min_exists: forall (r:seq R) (F: R -> R), r != [::] -> i0 s Ih _. case Hs: (s != [::]). elim (Ih Hs) => i1 [Hi0 Hi1]. elim (Rle_dec (F i0) (F i1)) => Hdec. by exists i0; split; [apply mem_head|rewrite big_cons -(last_cons i0 Hs) Hi1 Rmin_left]. exists i1; split. by rewrite in_cons; rewrite Hi0; apply orbT. rewrite big_cons -(last_cons i0 Hs) Hi1 Rmin_right;[done|]. by left; apply: Rnot_le_gt. exists i0; rewrite big_cons. by move/eqP: Hs => Hs; split; [apply mem_head| rewrite Hs big_nil /last //= Rmin_right; [|right]]. Qed. Lemma big_min_le: forall (r: seq R) (F : R-> R) i0, i0 \in r -> \big[Rmin/F (last 0 r) ]_(i r F i0 Hi0. have Hnul: r != [::]. apply/eqP=> Hr; rewrite Hr in Hi0 . have Hr2:= @in_nil _ i0. by rewrite Hi0 in Hr2. move: Hnul Hi0; elim r; first by done. move=> i s IHs _ Hri0. rewrite big_cons. case Hi: (i0 == i). move/eqP: Hi => Hi; rewrite Hi; apply Rmin_l . apply Rle_trans with (\big[Rmin/F (last 0 (i :: s))]_(j Hr; rewrite Hr in Hri0 . have Hr2:= @in_nil _ i0. by rewrite Hri0 in Hr2. by rewrite -(last_cons i Hnul); apply IHs. Qed. Lemma big_min_max_le: forall (r: seq R) (F : R-> R), r!=[::] -> \big[Rmin/F (last 0 r) ]_(i r F Hr. case r; first by (rewrite !big_nil; right). move=> i s; apply Rle_trans with (F i); [apply: big_min_le|apply: big_max_le]; apply: mem_head. Qed. End min_max_big. Section patchRmax. Variable p: nat. Definition Rmax2 r1 r2: R := match (Rlt_le_dec R0 r1) with |left _ => Rmax r1 r2 |right _ => match (Rlt_le_dec R0 r2) with |left _ => Rmax r1 r2 |right _=> Rmin r1 r2 end end. Lemma com_rmax2: commutative Rmax2. Proof. move=> x y; rewrite /Rmax2; case (Rlt_le_dec R0 x) => Hx; case (Rlt_le_dec R0 y) => Hy; [by rewrite Rmax_comm |by rewrite Rmax_comm| by rewrite Rmax_comm |by rewrite Rmin_comm]. Qed. Lemma el_n_zerol: left_id R0 Rmax2. Proof. move=> x ; rewrite /Rmax2; case (Rlt_le_dec R0 x) => Hx0; case (Rlt_le_dec R0 R0) => H00. case (Rlt_irrefl R0 H00). rewrite /Rmax; case (Rle_dec R0 x) => h0x; auto with real. case (Rlt_irrefl R0 H00). rewrite /Rmin; case (Rle_dec R0 x) => h0x; auto with real. Qed. Lemma el_n_zeror: right_id R0 Rmax2 . Proof. move=>x; rewrite com_rmax2; apply el_n_zerol. Qed. Lemma ass_max2 : associative Rmax2. Proof. move=> x y z. rewrite /Rmax2 ; case (Rlt_le_dec R0 x) => Hx0. rewrite !(com_rmax2 _ z) /Rmax2; case (Rlt_le_dec R0 z) => Hz0. rewrite !(Rmax_comm z _); apply Rmax_assoc. case (Rlt_le_dec R0 y) => Hy0 //=. case (Rlt_le_dec R0 (Rmax x y))=> Hxy //=. by rewrite !Rmax_assoc (Rmax_comm z _). have h2 : ~ Rmax x y hxy; apply Rlt_le_trans with x ; rewrite //=; apply RmaxLess1 . by elim h2. case (Rlt_le_dec R0 (Rmax x y))=> Hrxy. rewrite Rmax_assoc (Rmax_comm z _) -Rmax_assoc. rewrite Rmax_left ; [rewrite Rmax_left;[done|]|]. apply Rle_trans with R0;[by apply Rmax_le|by left]. apply Rle_trans with R0; [by apply Rmin_le|by left]. rewrite Rmax_left in Hrxy. by case (RIneq.Rle_not_lt R0 x Hrxy). by left; apply Rle_lt_trans with R0. case (Rlt_le_dec R0 (Rmax2 y z)) => H2. rewrite /Rmax ; case (Rle_dec x (Rmax2 y z)) => Hxyz. case (Rlt_le_dec R0 y) => Hy0. by rewrite Rmax_right; [|left; apply Rle_lt_trans with R0]. rewrite /Rmax2; case (Rlt_le_dec R0 (Rmin x y))=> Hmin. have Hmin2: Rmin x y > 0 by rewrite //=. move: Hmin2; rewrite Rmin_Rgt=>Hmin2; case Hmin2 => H0 H1. by case (RIneq.Rle_not_lt R0 x ). rewrite com_rmax2; rewrite /Rmax2; case (Rlt_le_dec R0 z) => Hz0. by rewrite Rmax_left;[rewrite Rmax_right;[|left; apply Rle_lt_trans with R0]| left; apply Rle_lt_trans with R0]. rewrite /Rmax2 in H2. move:H2. case (Rlt_le_dec R0 y) => Hy01 H2. move: H2; rewrite Rmax_Rlt_el => H2; case H2 => H3. by case (RIneq.Rle_not_lt R0 y ). by case (RIneq.Rle_not_lt R0 z ). move: H2. case (Rlt_le_dec R0 z)=> H0z1 H2. by case (RIneq.Rle_not_lt R0 z ). case (Rmin_split y z) => hr; rewrite hr in H2. by case (RIneq.Rle_not_lt R0 y). by case (RIneq.Rle_not_lt R0 z). have H1: x H0y H2. rewrite Rmax_right;[|apply Rle_trans with R0; fourier]. move: H2; rewrite -Rmax_le2 => H2; case H2 => Hxy. by case (RIneq.Rle_not_lt R0 y). move:H2; rewrite /Rmax2. case (Rlt_le_dec R0 z) => H0z H2. move: H2; rewrite -Rmax_le2 => H2; case H2 => Hzy1 Hzy2. by case (RIneq.Rle_not_lt R0 z). case (Rlt_le_dec R0 y) => Hy0. by case (RIneq.Rle_not_lt R0 y). rewrite /Rmax2; case (Rlt_le_dec R0 (Rmin x y)) => Hmin. case (Rmin_split x y) => H; rewrite H in Hmin. by case (RIneq.Rle_not_lt R0 x). by case (RIneq.Rle_not_lt R0 y). case (Rlt_le_dec R0 z) => Hz0. by case (RIneq.Rle_not_lt R0 z). apply Rmin_assoc. Qed. Canonical Structure is_mon_law:= Monoid.Law ass_max2 el_n_zerol el_n_zeror. Canonical Structure is_ab_law:= Monoid.ComLaw com_rmax2. Lemma Rmax_Rmax2: forall x y, R0 R0 Rmax x y = Rmax2 x y. Proof. move=> x y Hx Hy; rewrite /Rmax2; case (Rlt_le_dec R0 x) => Hx0; first by done. case (Rlt_le_dec R0 y) => Hy0; first by done. have Hex: x=R0. by apply Rle_antisym. have Hey: y=R0. by apply Rle_antisym. rewrite Hex Hey /Rmax /Rmin; case (Rle_dec R0 R0)=> H00; auto with real. Qed. Lemma sxbigD1 : forall j (P : ‘I_p -> bool) F, (forall i, R0 P j -> \big[Rmax/R0]_(i
j P F HF Pj. have H1: forall P F, (forall i, R0 \big[Rmax/0]_(i P0 F0 Hf. apply: (@eq_big_op _ (fun r => R0 x y Hx Hy; apply Rle_trans with x; [done| apply RmaxLess1]. move=> x y Hx Hy; rewrite /Rmax2; case (Rlt_le_dec R0 x) => Hx0; first by done. case (Rlt_le_dec R0 y) => Hy0; first by done. have Hex: x=R0. by apply Rle_antisym. have Hey: y=R0. by apply Rle_antisym. rewrite Hex Hey /Rmax /Rmin; case (Rle_dec R0 R0)=> H00; auto with real. move=> i Hi; apply Hf. rewrite !(H1 _ _ HF). rewrite Rmax_Rmax2. rewrite (bigD1 j) //=. apply HF. apply: big_prop; first by right. by move=> x y Hx Hy; rewrite -Rmax_Rmax2 ; [ apply Rle_trans with x ;[|apply RmaxLess1]| |]. move=>*; apply HF. Qed. Lemma Rmax_le_f_le: forall (f g: ‘I_p ->R), (forall i, f i \big[Rmax/0]_i f i f g Hfg . by apply: big_rel; [right|move=>*; apply rmax4 |move=>*;apply Hfg]. Qed. Lemma sum_le_f_le: forall (f g: ‘I_p ->R), (forall i, f i \big[Rplus/R0]_i f i f g Hfg; apply:big_rel; [right|move=>*; apply Rplus_le_compat |move=>*;apply Hfg]. Qed. Lemma distr_mult_max: forall (r:R) (f:’I_p->R), R0 r* (\big[Rmax/0]_j (f j))= \big[Rmax/R0]_j (r*f j). Proof. move => r f Hr. (*rewrite (eq_big_op (fun r => 0 Rmult r x)); [rewrite //= ; ring| by move=>a b c H1 H2; rewrite H1 -H2| by move=>a b c H; rewrite H|]. move=> a b; rewrite /Rmax; case (Rle_dec a b) =>H; case (Rle_dec (r*a) (r*b)) => Hra; try done; [by case Hra; apply Rmult_le_compat_l| case Hr => H1; [ by case H;apply Rmult_le_reg_l with r| rewrite -H1; ring]]. Qed. (*use this lemma for proving positive homogenity*) Lemma max_exists: forall p, (0
forall (f:’I_p->R), (forall i, 0 exists k, \big[Rmax/0]_j (f j ) = f k. Proof. move =>q Hq v Hv. move : (I_not_void Hq). rewrite /enum -/(index_enum (ordinal_finType q)). have hu1: uniq (index_enum (ordinal_finType q)). rewrite /index_enum -enumT; apply enum_uniq. have Hfi: forall s, filter ‘I_q s = s. move=> s. elim: s; first by done. by move=> t s IH; rewrite /=; f_equal. rewrite Hfi. elim: (index_enum ) hu1. by rewrite /=. move => x s IH IHun Iht. rewrite cons_uniq in IHun. move/andP: IHun => IHun; elim IHun => I1 I2. rewrite big_cons. case A:(Nil _ != s). elim (Rle_dec ((v x))(\big[Rmax/0]_(j I3. elim (IH I2 A) => k Hk. exists k; rewrite -Hk. unfold Rmax at 1 ; case (Rle_dec ( v x) (\big[Rmax/0]_(j A. rewrite -A //=. have H:= Hv x. rewrite big_nil. unfold Rmax; case (Rle_dec (v x) 0); auto with real. Qed. Lemma max_exists_seq: forall (r : seq R) f, r != [::] -> (forall i, i \in r -> 0 r F Hr.*) move: Hr Hf; elim r; first by done. move=> i0 s Ih _ IHf. case Hs: (s != [::]). have Hfi: (forall i : real_eqType, i \in s -> 0 i Hi; apply IHf; rewrite in_cons; apply/orP; right. elim (Ih Hs Hfi) => i1 [Hi0 Hi1]. elim (Rle_dec (F i0) (F i1)) => Hdec. exists i1; split. by rewrite in_cons; rewrite Hi0; apply orbT. by rewrite big_cons Hi1 Rmax_right. exists i0; split; [apply: mem_head|rewrite big_cons Hi1 Rmax_left;[done|]]. by left; apply: Rnot_le_gt. exists i0; rewrite big_cons. move/eqP: Hs => Hs; split; [apply: mem_head|]. rewrite Hs big_nil //=. rewrite /Rmax; case (Rle_dec (F i0) 0) => Hi0; last by done. by apply Rle_antisym; [apply IHf; apply mem_head|]. Qed. Lemma max_exists_seq2: forall (r : seq R) f, r != [::] -> r F Hr.*) move: Hr ; elim r; first by done. move=> i0 s Ih _ . case Hs: (s != [::]). elim (Ih Hs ) => i1 [Hi0 Hi1]. elim (Rle_dec (F i0) (F i1)) => Hdec. exists i1; split. by rewrite in_cons; rewrite Hi0; apply orbT. rewrite -(last_cons i0 Hs). by rewrite big_cons Hi1 Rmax_right. exists i0; split; [apply: mem_head|rewrite big_cons -(last_cons i0 Hs) Hi1 Rmax_left;[done|]]. by left; apply: Rnot_le_gt. exists i0; rewrite big_cons. move/eqP: Hs => Hs; split; [apply: mem_head|]. rewrite Hs big_nil //=. rewrite /Rmax; case (Rle_dec (F i0) (F i0)) => Hi0; done. Qed. Lemma desc_max: forall (v: ‘I_p -> R) j, (forall i, 0 \big[Rmax/0]_i (v i ) = Rmax (v j) (\big[Rmax/R0]_(i
v j H; apply sxbigD1 with (P:=(fun _ :’I_p=> true)) (j:=j) (F:= (fun t => (v t))). Qed. Lemma max_max: forall (v:’I_p->R) i, (forall i, 0 v i v i H; rewrite (desc_max i H); apply RmaxLess1. Qed. Lemma distr_plus_max: forall (r f:’I_p->R), (forall i, 0 (forall i, 0 (\big[Rmax/0]_j (f j + r j)) g f Hg Hf. have Hfg: forall i, 0 i; apply Rplus_le_le_0_compat; [apply Hf|apply Hg]. elim: index_enum. rewrite !big_nil; right; ring. move=> t s IH. rewrite !big_cons. apply Rle_trans with (Rmax (f t + g t) ( \big[Rmax/0]_(j m n; rewrite /maxn. Print Scope nat_scope. case C: (m C; omega] . by rewrite max_l; [|move/leP:C=>C; omega]. Qed. Lemma desc_max_f: forall f j, max_f f = max (f j) (\max_(i
f j; rewrite -max_maxn (desc_max_f0 f j). Qed. Lemma max_greater: forall (f:’I_p->nat) (k:’I_p), (f k f k. rewrite (desc_max_f f k). by apply le_max_l. Qed. *) End patchRmax. Section patchRmin. Variable p: nat. (*we need for the next lemmas to compute the minimum of a vector with positive values; ticky because we don’t have a neutral element with respect to this opperation*) Definition less_1 r := Rmin r 1. Definition min_del (v:’I_p ->R) := \big[Rmin/1]_i (less_1 (v i)). Definition Rmin2 r1 r2: R := match (Rlt_le_dec r1 R1) with |left _ => Rmin r1 r2 |right _ => match (Rlt_le_dec r2 R1) with |left _ => Rmin r1 r2 |right _=> Rmax r1 r2 end end. Lemma com_rmin2: commutative Rmin2. Proof. move=> x y; rewrite /Rmin2; case (Rlt_le_dec x R1 ) => Hx; case (Rlt_le_dec y R1) => H; [by rewrite Rmin_comm |by rewrite Rmin_comm| by rewrite Rmin_comm |by rewrite Rmax_comm]. Qed. Lemma min_el_n_zerol: left_id R1 Rmin2. Proof. move=> x ; rewrite /Rmin2; case (Rlt_le_dec x R1 ) => Hx0; case (Rlt_le_dec R1 R1) => H00. case (Rlt_irrefl R1 H00). rewrite /Rmin; case (Rle_dec R1 x) => h0x; auto with real. case (Rlt_irrefl R1 H00). rewrite /Rmax; case (Rle_dec R1 x ) => h0x; auto with real. Qed. Lemma min_el_n_zeror: right_id R1 Rmin2 . Proof. move=>x; rewrite com_rmin2; apply min_el_n_zerol. Qed. Lemma ass_min2 : associative Rmin2. Proof. move=> x y z. rewrite /Rmin2 ; case (Rlt_le_dec x R1) => Hx0. rewrite !(com_rmin2 _ z) /Rmin2; case (Rlt_le_dec z R1) => Hz0. rewrite !(Rmin_comm z _); apply Rmin_assoc. case (Rlt_le_dec y R1) => Hy0 //=. case (Rlt_le_dec (Rmin x y) R1)=> Hxy //=. by rewrite !Rmin_assoc (Rmin_comm z _). have h2 : ~ 1 hxy; apply Rle_lt_trans with x ; rewrite //=; apply Rmin_l . by elim h2. case (Rlt_le_dec (Rmin x y) R1)=> Hrxy. rewrite Rmin_assoc (Rmin_comm z _) -Rmin_assoc. rewrite Rmin_left ; [rewrite Rmin_left;[done|]|]. apply Rle_trans with R1; [by left | by apply Rmin_ge ]. apply Rle_trans with R1; [by left | by apply Rmax_ge]. rewrite Rmin_left in Hrxy. by case (RIneq.Rle_not_lt x R1 Hrxy). by left; apply Rlt_le_trans with R1. case (Rlt_le_dec (Rmin2 y z) 1) => H2. rewrite /Rmin ; case (Rle_dec x (Rmin2 y z)) => Hxyz. by case (RIneq.Rle_not_lt x 1 ); [|apply Rle_lt_trans with (Rmin2 y z)]. case (Rlt_le_dec y 1) => Hy0. by rewrite Rmin_right; [|left; apply Rlt_le_trans with R1]. rewrite /Rmin2; case (Rlt_le_dec (Rmax x y) 1)=> Hmin. by case (RIneq.Rle_not_lt x 1 ); [|apply Rle_lt_trans with (Rmax x y); [apply RmaxLess1|]]. rewrite com_rmin2; rewrite /Rmin2; case (Rlt_le_dec z 1) => Hz0. by rewrite Rmin_left;[rewrite Rmin_right;[|left; apply Rlt_le_trans with R1]| left; apply Rlt_le_trans with R1]. rewrite /Rmin2 in H2. move:H2. case (Rlt_le_dec y 1) => Hy01 H2. by case (RIneq.Rle_not_lt y 1). move: H2. case (Rlt_le_dec z 1)=> H0z1 H2. by case (RIneq.Rle_not_lt z 1). by case (RIneq.Rle_not_lt y 1); [|apply Rle_lt_trans with (Rmax y z);[apply RmaxLess1|]]. case (Rlt_le_dec y 1) => H0y. rewrite /Rmin; case (Rle_dec x y) => Hxy. by case (RIneq.Rle_not_lt y 1); [apply Rle_trans with x|]. rewrite Rmax_right; first by done. move: H2; rewrite /Rmin2; case (Rlt_le_dec y 1) =>Hy1 H2. by case (RIneq.Rle_not_lt y 1); [apply Rle_trans with (Rmin y z); [|apply Rmin_l]|]. by case (RIneq.Rle_not_lt y 1). rewrite /Rmin2; case (Rlt_le_dec (Rmax x y) 1) => Hmin. by case (RIneq.Rle_not_lt x 1); [|apply Rle_lt_trans with (Rmax x y);[apply RmaxLess1|]]. case (Rlt_le_dec z 1) => Hz. move: H2;rewrite /Rmax; case (Rle_dec x (Rmin2 y z))=> Hx1 H2. move: H2; rewrite /Rmin2. case (Rlt_le_dec y 1) => H1. by case (RIneq.Rle_not_lt y 1). case (Rlt_le_dec z 1 ) => Hz1 H2. by case (RIneq.Rle_not_lt z 1); [apply Rle_trans with (Rmin y z); [|apply Rmin_r]|]. by case (RIneq.Rle_not_lt z 1). move: H2; rewrite /Rmin2. case (Rlt_le_dec y 1) => Hy. by case (RIneq.Rle_not_lt y 1). case (Rlt_le_dec z 1) => Hz2 H2. by case (RIneq.Rle_not_lt z 1); [apply Rle_trans with (Rmin y z); [|apply Rmin_r]|]. by case (RIneq.Rle_not_lt z 1). rewrite -Rmax_assoc. rewrite /Rmax; case (Rle_dec x (Rmax y z)) => Hxyz. rewrite Rmax_right /Rmin2; case ((Rlt_le_dec y 1)) => Hy. by case (RIneq.Rle_not_lt y 1). case ((Rlt_le_dec z 1)) => Hz1. by case (RIneq.Rle_not_lt z 1). done. by case (RIneq.Rle_not_lt y 1). case ((Rlt_le_dec z 1)) => Hz1. by case (RIneq.Rle_not_lt z 1). done. rewrite /Rmax; case (Rle_dec x (Rmin2 y z)); last by done. rewrite /Rmin2; case ((Rlt_le_dec y 1)) => Hy. by case (RIneq.Rle_not_lt y 1). case ((Rlt_le_dec z 1)) => Hz1. by case (RIneq.Rle_not_lt z 1). move=> H; case (Hxyz H). Qed. Canonical Structure is_mon_law_min:= Monoid.Law ass_min2 min_el_n_zerol min_el_n_zeror. Canonical Structure is_ab_law_min:= Monoid.ComLaw com_rmin2. Lemma Rmin_Rmin2: forall x y, x y Rmin x y = Rmin2 x y. Proof. move=> x y Hx Hy; rewrite /Rmin2; case (Rlt_le_dec x R1) => Hx0; first by done. case (Rlt_le_dec y R1) => Hy0; first by done. have Hex: x=R1. by apply Rle_antisym. have Hey: y=R1. by apply Rle_antisym. rewrite Hex Hey /Rmax /Rmin; case (Rle_dec R1 R1)=> H00; auto with real. Qed. Lemma smin_bigD1 : forall j (P : ‘I_p -> bool) F, (forall i, F i P j -> \big[Rmin/R1]_(i
j P F HF Pj. have H1: forall P F, (forall i,F i \big[Rmin/1]_(i P0 F0 Hf. apply: (@eq_big_op _ (fun r => r x y Hx Hy; apply Rle_trans with x; [apply Rmin_l|done]. move=> x y Hx Hy; rewrite /Rmin2; case (Rlt_le_dec x R1) => Hx0; first by done. case (Rlt_le_dec y 1) => Hy0; first by done. have Hex: x=R1. by apply Rle_antisym. have Hey: y=R1. by apply Rle_antisym. rewrite Hex Hey /Rmax /Rmin; case (Rle_dec R1 R1)=> H00; auto with real. move=> i Hi; apply Hf. rewrite !(H1 _ _ HF). rewrite Rmin_Rmin2. rewrite (bigD1 j) //=. apply HF. apply big_prop; first by right. move=> x y Hx Hy; rewrite -Rmin_Rmin2; try done. by apply Rle_trans with x; [apply Rmin_l|]. move=>*; apply HF. Qed. Lemma minbigD1 : forall j (P : ‘I_p -> bool) F, (forall i, F i P j -> \big[Rmin/R1]_(i
j P F HF Pj. have H1: forall P F, (forall i, F i \big[Rmin/1]_(i P0 F0 Hf. apply: (@eq_big_op _ (fun r => r x y Hx Hy; apply Rle_trans with x; [apply Rmin_l|done]. move=> x y Hx Hy; rewrite /Rmin2; case (Rlt_le_dec x R1) => Hx0; first by done. case (Rlt_le_dec y 1) => Hy0; first by done. have Hex: x= 1 . by apply Rle_antisym. have Hey: y= 1 . by apply Rle_antisym. rewrite Hex Hey /Rmax /Rmin; case (Rle_dec 1 1)=> H00; auto with real. move=> i Hi; apply Hf. rewrite !(H1 _ _ HF). rewrite Rmin_Rmin2. rewrite (bigD1 j) //=. apply HF. apply big_prop; first by right. move=> x y Hx Hy; rewrite -Rmin_Rmin2; try done. by apply Rle_trans with x; [apply Rmin_l|]. move=>*; apply HF. Qed. Lemma desc_min:forall v j, \big[Rmin/R1]_i less_1 (v i ) = Rmin (less_1 (v j)) (\big[Rmin/R1]_(i
v j . apply: minbigD1; [by move =>*; rewrite /less_1; apply Rmin_r|done]. Qed. Lemma min_min: forall (v:’I_p->R) i, min_del v v i ; rewrite /min_del (desc_min v i). apply Rle_trans with (less_1 (v i)). apply Rmin_l. rewrite /less_1; apply Rmin_l. Qed. Lemma min_ge0: forall (v:’I_p->R), (forall j, 0 0 v H; rewrite /min_del . elim (index_enum (ordinal_finType p) ). rewrite big_nil; fourier. move => x s IH. rewrite big_cons; apply Rmin_Rgt_r; split. rewrite /less_1; apply Rmin_Rgt_r; split; [ apply: H|fourier]. case S:(Nil _ !=s). by apply: IH. move/eqP:S => S; rewrite -S big_nil; fourier. Qed. End patchRmin. (*Implicit Arguments max_f [p].*) Implicit Arguments min_del [p]. Implicit Arguments min_ge0 [p]. Implicit Arguments Rmax_le_f_le [p]. Implicit Arguments sum_le_f_le [p]. Implicit Arguments distr_plus_max [p]. Open Scope R_scope. Open Scope ring_scope. Delimit Scope R_scope with Re. Section real_big. Variable p: nat. Lemma ineq_sum_el: forall v r,(0 0 (forall x, v x \big[Rplus/R0]_(i
f r Hp Hr H. have H1: forall s, [::] !=s ->\big[Rplus/0]_(i s; elim s. rewrite //=. move=> j s0 IH _. rewrite big_cons ; simpl (size (j::s0)). case A: ([::] != s0). apply Rlt_le_trans with (r/ INR p+ r * INR (size s0) / INR p )%Re. by apply Rplus_lt_compat; [ apply H|apply IH]. by right; rewrite /Rdiv (S_INR (size _)) (Rmult_plus_distr_l r _ _) Rmult_plus_distr_r Rplus_comm Rmult_1_r. move/eqP:A=>A; rewrite -A big_nil /size . replace (INR 1) with R1; last by auto with real. rewrite Rmult_1_r; toR; ring_simplify ; apply H. replace r with (r *(INR (size (index_enum (ordinal_finType p))))/INR p)%Re. apply H1; rewrite /index_enum -enumT. apply (I_not_void Hp). rewrite /index_enum -enumT; rewrite size_enum_ord; field; apply Rgt_not_eq; apply: lt_INR_0. by move/ltP : Hp. Qed. Lemma abs_sum_le_sum_abs: forall (p: nat) (f: ‘I_p ->R) , Rabs (\sum_i (f i)) m v. elim index_enum. by rewrite !big_nil Rabs_R0; right. move => x s IH . rewrite !big_cons. apply Rle_trans with (1:= Rabs_triang _ _). by apply Rplus_le_compat_l. Qed. Lemma echiv_sums: forall N f, sum_f_R0 f N = \sum_(i N f . induction N. rewrite big_ord_recl //=. have Heq: \sum_(i R) n, \sum_(i f N; rewrite big_ord_recr /= GRing.addrC. Qed. Lemma sum_dif: forall (f:nat ->R) m n, (m \sum_(i f m n. induction n => H //=. have H0 : (m H; omega|]. elim (le_lt_eq_dec _ _ H0) => H1. rewrite sum_S_eq. transitivity ( \sum_(i H1; rewrite (IHn H1). replace (m.+1) with (O+(m.+1))%coq_nat;[|omega]. have H2:= (@big_addn _ _ _ (O%nat) (n.+1)%nat (m.+1) (fun _ => true) f). rewrite H2. have H3:= (@big_addn _ _ _ (O%nat) ((n.+1).+1) (m.+1) (fun _ => true) f). rewrite H3. rewrite !big_mkord. replace (n.+1 — m.+1)%Dn with ((n — m.+1).+1)%Dn. replace ( (n.+1).+1 — m.+1)%Dn with ((((n — m.+1).+1).+1)%nat). have H4:= sum_S_eq (fun i => f (i + m.+1)%Dn) ((n — m.+1)). rewrite H4. replace (((n — m.+1).+1 + m.+1)%Dn) with (n.+1). rewrite /@GRing.add //=; ring. rewrite -ltn_subS; last by done. by nat_norm; nat_congr; rewrite subnK. rewrite -ltn_subS; last by done. by rewrite (subSS) leq_subS. by rewrite leq_subS. rewrite H1. rewrite sum_S_eq /GRing.opp /GRing.add /= /Rminus. rewrite Rplus_assoc Rplus_opp_r Rplus_0_r. have H2:= (@big_addn _ _ _ (O%nat) ((n.+1).+1) ((n.+1)) (fun _ => true) f). pattern (n.+1) at 2; replace (n.+1) with (O%nat+n.+1)%nat; last by done. rewrite H2 big_mkord. replace ((n.+1).+1 — n.+1)%Dn with (S O)%nat. by rewrite big_ord_recl //= big_ord0 Rplus_0_r. by rewrite (subSS) subSnn. Qed. End real_big. Implicit Arguments ineq_sum_el [p]. Implicit Arguments abs_sum_le_sum_abs[p].